简体   繁体   中英

Watir, Automation on Windows 7 with IE8

I am trying to run watir scripts on Wndows 7 on IE8 as administrator.

Here is problem description: Problem was with below statement(popup windows)

popup = Watir::IE.attach(:url, /ContactDetails/)

and Error message was Unable to locate the url(ContactDetails)

The issue seems to be that when there already exists an instance of IE8 that was opened with administrative privs, Watir won't see any other IE8 windows that are being run as admin, including ones it opens itself.

Fix that i have been doing: Turn off User Account Control (set to the lowest setting). Go to Control Panel->System and Security->Action Center->Change User Account Control settings, and drop the slider to the lowest setting.

But this is not a permanent fix, i have to change the windows 7 settings every day to run my automation script.

Can anyone help me finding out the permanent solution ?

据我所知,watir-webdriver没有IE类和attach方法。

Have you tried to attach via the title of the page? for example: browser2 = Watir::IE.attach(:title, "Google")

if the browser you wanted to attach to was Googles home page.

Look at the source code and put whatevers inbetween the title tags on your page. Google

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM