Watir (Web application testing in Ruby) is a test automation framework developed with Ruby that makes it easy to automate WEB application testing.
There was a problem running its own GOOGLE_SEARCH.RB example when the installation and configuration was complete.
First, give an account of the environment,vista+ie7+watir1.6.2
problem : Currently, if you have an IE window open, the Ie.goto test_site statement cannot open the Google home page in ie=watir::ie.new newly opened window. So every time you run to step two, that is, Ie.text_field (: Name, "Q"). Set "Pickaxe" error, the error message is probably the meaning: the current page cannot find the element named Q.
analysis Reason : Vista has strict user Rights management mechanism, all end user login is to normal user rights, so when installing software, will frequently appear whether to allow the prompt box.
Workaround :
1. Turn off user access management .
In Vista, user account controls are used with UAC, which can be turned off from Control Panel on the current user. Steps:
I> Open Control Panel and select "User account"
Ii> Click the account you want to edit, and on the left-hand side of the action list there is a "turn on or off" user account "", click this link
iii> Remove the option to "Use User Account Control (UAC) to help protect your computer" by clicking OK and restarting the computer.
Recommended use of this method, not only can solve the current problem, but also eliminates the installation of software in the future when the cumbersome prompts.
2. Close the protection mode of IE browser.
i> Open the Internet Options window and switch to the Security tab page.
Ii> Remove the "Enable Protected Mode" option in the "Internet", "Local intranet" and "Restricted Sites" sites, and click the OK button to restart IE again.
Reference articles:
What should I do if two browser windows appear when running a test under Windows Vista?
Ways to Turn off and Disable Vista IE 7 Protected Mode