Hello everyone,
I am using watir gem for cucumber tool to automate my project.
I am trying to click on a menu tab using the below code
browser.div(:class => "nav_main_dropdown", :id => "dropdown_2").click
when i execute the above stmt, no error occurs. But i couldnt not see
any action taken place on the screen.
so i modified the above stmt to
#browser.div(:class => "nav_main_dropdown", :id =>
"dropdown_2").focus()
browser.div(:class => "nav_main_dropdown", :id =>
"dropdown_2").fire_event('onClick')
but i get the error as
C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.8.1/lib/watir/element.rb:
316:in `method_missing': (in OLE method `focus': )
(WIN32OLERuntimeError)
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.
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.8.1/lib/watir/
element.rb:316:in `focus'
from temp.rb:8:in `<main>'
And i tried with different div and li properties to click on a object.
But nothing is working out.
Could anyone please help me on resolving this issue.
Thanks
Varalakshmi
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]