Ruby 192 + watir 3.0.0
Today, I encountered a strange problem: Use watir: IE. attach in the script to locate a new ie window, and always report an error. error message:
Watir-classic-3.0.0/lib/watir-classic/ie-class.rb: 760: In 'rescue in attach_browser_window ': unable to locate a window with URL (? -Mix: Baidu.com) (watir: exception: nomatchingwindowfoundexception )"
The script does not execute my watir: IE. Attach () at all ().
1. Copy the ruby environment to the Windows 2003 + IE 7 Environment on another machine, in watir: IE. attach () in the previous step IE. link (: ID, 'kuaiyixie '). click to add IE. wait will be able to locate the new page, but it is always unavailable in my local environment, with IE. wait does not work either. Maybe it's a bad character.
In addition, in Windows 2003 + IE 7, the browser security enhancement problem may occur. Solution: DeleteProgram-In the add windows component window, remove the Security Configuration check in the browser,
2. Final Solution: Modify the startup method of IE and change watir: IE. New to watir: IE. new_process.
Nnd has been tossing around for almost a morning. In the afternoon, I accidentally saw this method on the Internet. In any case, it would be nice to solve the problem.