【问题标题】:ie11 should start new session every time when run with robot framework but it's unable start new sessionie11 每次使用机器人框架运行时都应该启动新会话,但它无法启动新会话
【发布时间】:2018-08-16 04:15:52
【问题描述】:

我正在尝试为登录页面实现机器人框架自动化测试。当我使用 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

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

【问题讨论】:

    标签: session internet-explorer-11 robotframework


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2010-11-27
      • 1970-01-01
      • 1970-01-01
      • 2011-10-21
      • 2018-07-04
      • 1970-01-01
      • 1970-01-01
      • 2012-08-03
      相关资源
      最近更新 更多