ie11应该在每次使用机器人框架运行时启动新会话但是它无法启动新会话

时间:2018-01-23 07:33:10

标签: session internet-explorer-11 robotframework

我正在尝试为登录页面实现机器人框架自动化测试。当我使用IE浏览器运行时,第一个用户的会话没有关闭,即使在使用&#34后用户也在登录;删除所有Cookie"第二个用户的关键字。这只适用于IE11浏览器,其余浏览器(chrome,Firefox和Edge)工作正常。

*** Settings ***
Library           Selenium2Library
Library           OperatingSystem

*** Variables ***
${url_google}     https://accounts.google.com/signin
${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
    Sleep  2s
    Input Text  //*[@id='identifierId']  xxxxxxxx@gmail.com
    Click Element  //*[@id='identifierNext']/content
    Sleep  2s
    Input Text  //*[@id='password']/div[1]/div/div[1]/input   abc123xxx@
    Click Element  //*[@id='passwordNext']
    Delete All Cookies
    Close Browser

任何想法?有没有其他人在机器人框架中看到过这个问题或类似问题?

1 个答案:

答案 0 :(得分:0)

Internet Explorer默认情况下在多个窗口和选项卡之间“共享”会话。尝试使用此选项打开新的Internet Explorer窗口

https://answers.microsoft.com/en-us/ie/forum/ie11-windows_7/new-session-shortcut-for-ie11/1b3e6408-abcd-4dea-8afa-acb7b15e8f71(即,用于打开Internet Explorer窗口的-noframemerging命令行参数)。它适用于我所遇到的情况,与您所呈现的情况类似。

让我们知道它是否对您有用。