简体   繁体   中英

Robot Framework Internet explorer not opening

I am writing some test cases in the Robot Framework using Ride. I can run the tests on both Chrome and Firefox, but for some reason Internet Explorer is not working.

I have tested with the iedriverServer.exe (32bit version 2.47.0.0).

One thing to add is that I am using a proxy. When I disable the proxy in IE and enable the automatic proxy configuration... IE can start up. But it can not load the website. For Chrome and FF the proxy is working fine.

Error message: WebDriverException: Message: Can not connect to the IEDriver.

I have also encountered the same problem.Below are the steps which i have followed.

1.I have enabled the proxy in IE.

2.Set environmental variable no_proxy to 127.0.0.1 before launching the browser Ex: Set Environmental Variable no_proxy 127.0.0.1

3.Set all the internet zones to same level(medium to high) expect restricted sites Open browser>Tools>Internet Options>Security Tab

4.Enable "Enable Protected mode" in all zones

Please let me know your feedback.

I had the same issue because my network environment is quite "hostile" and I have to deal with NTLM proxy and limited access policies.

To solve this, no_proxy and webdriver.ie.driver environment variables must be properly setted:

Set Environment Variable    no_proxy    127.0.0.1
Set Environment Variable    webdriver.ie.driver    ${local_ie_driver}

... before you call for IE to open, like in this little example:

*** Settings ***
Library           Selenium2Library
Library           OperatingSystem

*** Variables ***
${url_google}     http://www.google.com/
${local_ie_driver}    D:${/}PortableApps${/}SeleniumIEWebDriver${/}IEDriverServer.exe

*** Test Cases ***
Google for macarronada using IE
    Set Environment Variable    no_proxy    127.0.0.1
    Set Environment Variable    webdriver.ie.driver    ${local_ie_driver}
    Open Browser    ${url_google}    ie
    Wait Until Page Contains    Google
    Input Text    id=lst-ib    macarronada
    Click Button    name=btnG
    Wait Until Page Contains    macarronada
    Close Browser

Hope it can help you.

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