Watir question,

hi,

I have two problem here.

First one is, SelectList appears in the page and I am able to choose
element manually.

But when I try to check using
“puts $browser.select_list(:id,“somevalue”).exists?”

It return false and consequently it is not choosing element also.

Second one is, I have text box in the same page and when I inquire using
" puts $browser.text_field(:id,“somevalue”).exists?"

It return true but when i attempt to enter the element into this text
box, it’s not entering, And It says that unable to locate the id.

could you anyone please provide any solution for the above two problem?

RAJ

Please provide the page HTML and the Ruby code.

hi This is the page comes from our local server. So you can’t access
that link,
The code which I have written is,

begin
$browser.select_list(:id,“MIR-POL”).select(replace[“type”])
rescue =>e
puts e.message
end

It throws the error of unable to locate the id. But I can choose
manually.

RAJ

Please attach/upload the relevant HTML. You can acquire this by
extracting the page’s source once you’ve reached the relevant page. You
can also remove any sensitive information before showing us the HTML.

Without seeing the page I can only guess that you might be using an
iFrame which you need to select before being able to access the
elements.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs