When I tried to use hpricot, I found some error like “safariwatir missingsourcefile” from the beginning.
and it is said in the internet that I should remove include Watir from the script.
after I removed the “include Watir”, I got another error message like “uninitilezed constant IE “, and the internet tells me I should use Watir::IE.start() instead of IE.start(), should use Watir::IE.attach() instead of IE.attach()
I encountered the error of Unknown OLE server: `AutoItX3.Control’ , following is the solotion:
navigate to the folder of \ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir, and type regsvr32 AutoItX3.dll
I faced a weird problem.
I can start a test job test.rb by WindowsXP task scheduler, but cannot initiate the test job by Windows Vista task scheduler, the test.rb can be run by double click on Windows Vista Explorer.
I encoutered a solution for this when I almost went to install windows xp on my computer, just Disable User Access Control on the Control Panel of Vista, and everything is ok.
I encountered a error 14001 when I tried to install watir 1.6.2 in a new computor, I googled and found:
the version of win32-api should be 1.3.0 or later
the version of windows-api should be 0.3.0 or later
the version of windows-pr should be 0.9.9 or later
After fix the above version problems, the watir can work properly.
Bellow is the code to refresh a browser using watir:
ie77.refresh
Related Blogs
Bellow is the code to choose the second option from a select box:
ie77.select_list(:class,’inputboxb’).select_item_in_select_list(:index,1)
Related Blogs
- Related Blogs on select_list