First week with watir-webdriver and Web app testing in general, so still trying to wrap some concepts around.
Having 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 doesn't actually drive the button to get clicked,
browser.button(:name, "_target0").click
So I got the driven Firefox clicking the button using either
browser.button(:name, "_target0").fire_event('on_click')
browser.button(:name, "_target0").when_present.click
but what are the differences between them?
browser.button.present?
– Shalna