In the first week, using watir-webdriver and testing web applications in general, so I'm still trying to wrap some concepts.
The presence of this javascript element:
<input type="submit" class="button" value="Search" name="_target0"> browser.button(:value, "Search").exists? => "true" browser.button(:value, "Pesquisar").present? => true browser.button(:name, "_target0").value => "Search"
This does not result in a button click,
browser.button(:name, "_target0").click
So, I got managed Firefox by clicking a button using
browser.button(:name, "_target0").fire_event('on_click') browser.button(:name, "_target0").when_present.click
but what are the differences between them?
watir-webdriver watir
Joao figueiredo
source share