I'm new to watir and currently using it for automating an application , however I'm stuck at one error when I try click a button.
Watir code looks like this :
$browser.button(:id,"Button_one").click
html for button looks like this:
<input id="Button_one" class="ButtonA ButtonB" type="submit" value="Continue">.
error displayed is:
WIN32OLERuntimeError: (in OLE method `focus': )
OLE error code:800A083E in htmlfile
Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
HRESULT error code:0x80020009
Exception occurred.
Ruby192/lib/--/input_elements.rb:294:in `method_missing'
Ruby192/lib/--/watir-classic/input_elements.rb:294:in `set'
Button does not seem to be invisible, disabled.What can be the reason for this error?? pls let me know how to deal with this ....
Try this:
$browser.button(:id => "Button_one").when_present.click
User contributions licensed under CC BY-SA 3.0