One easy way to find out what's going on is to use a webdriver browser
session created in IRB to navigate to the page, and find out what
response you get when you manually enter variations on the command.
without some output it's going to be difficult to trace the issue.
Maybe these would help to give you some ideas:
puts driver.find_elements(:name, "btnEdit").length
puts driver.find_elements(:class, "dk2564").length
Selenium-Webdriver is a bit awkward to use without Watir's API so I
haven't played with it much. Still, the steps to finding the solution
are the same: Experiment using IRB, add debugging helpers around the
problem area by reporting back each line's result, and validate every
interaction before continuing to the next step.
webdriver should wait for the page to load when it clicks on an element
which causes a redirect or change.
If the change is something which isn't covered by webdriver's normal
approach to waiting, then wait for that specific change to occur using
webdriver's "wait" method.
One easy way to find out what's going on is to use a webdriver browser
session created in IRB to navigate to the page, and find out what
response you get when you manually enter variations on the command.
without some output it's going to be difficult to trace the issue.
I write "xpath" as below:
p driver.title
driver.find_element(:xpath,"//form[contains(@name,'picklist_PickListItemListForm')]/table[contains(@class,'contentBody')]/tbody/tr/td/table[contains(@class,'content')]/tbody/tr/td/table[1]/tbody/tr/td[contains(@class,'dk64')]/input[contains(@name,'btnEdit')]").click
until driver.title.include? "View List"
But the event is not occurring means not happening the click. And If i
removed the "until",then worked fine with "xpath". So what's wrong with
my click? any idea...