在Robotframework中进行AutoIT Widows身份验证后,无法重新将注意力集中到浏览器

时间:2018-07-19 07:59:16

标签: selenium robotframework autoit selenium2library

我要在Robotframework中自动执行的条件:

  1. 转到URL(Library Selenium2Library)
  2. 使用Windows身份验证登录(Library AutoItLibrary)
  3. 将注意力集中到浏览器上

RobotFramework中的TestCase:

打开浏览器:

*** Settings ***
Library  Selenium2Library

*** Variables ***


*** Keywords ***
Begin Web Test
    open browser  ${URL}  ${BROWSER}

End Web Test
    close all browsers

登录并创建IO:

*** Settings ***
Library  Selenium2Library
Library  AutoItLibrary

*** Variables ***


*** Keywords ***
Login and createIO
  sleep  3s
  WaitForActiveWindow  WindowTitle=Authentication Required
  Send  ${Subscriptionsusername}
  Send  {TAB}
  Send  ${Subscriptionspassword}
  Send  {ENTER}
  Capture Page Screenshot


  Click Link  xpath=//*[@class='tss-main-nav']/nav/ul/li[3]

我遇到的问题:

  • 此身份验证之后,用户可以访问浏览器,但是单击链接的下一个测试不起作用。就像焦点不在浏览器上一样。我在身份验证后使用了所有这些内容:

  #Select Window  URL=${URL}
  #Select Window  NEW
  #Select Window  MAIN
  #Wait Until Element Is Visible  xpath=//*[@class='tss-main-nav']/nav/ul/li[3]
  #Set focus  Campaign Start:

在Robotframework上运行测试时出错:

Should be able to CreateIO :: Testing Apollo website                  | FAIL |
WebDriverException: Message: [Exception... "Component not initialized"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: chrome://marionette/content/modal.js :: get window :: line 143"  data: n
o]

非常感谢您提出解决此问题的建议...

0 个答案:

没有答案