IE11 每次使用机器人框架运行时都应启动新会话,但无法启动新会话



我正在尝试为登录页面实施机器人框架自动化测试。当我使用 IE 浏览器运行时,第一个用户的会话没有关闭,即使在对第二个用户使用"删除所有 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

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

默认情况下,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 命令行参数)。它适用于我遇到的情况,这与你呈现的情况相似。

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

相关内容

最新更新