selenium - 在 Robotframework 中进行 AutoIT Widows 身份验证后,焦点未回到浏览器
问题描述
我试图在 Robotframework 中自动化的一个条件:
- 转到 URL(库 Selenium2Library)
- 使用 Windows 身份验证登录(库 AutoItLibrary)
- 焦点回到浏览器
RobotFramework 中的测试用例:
打开浏览器:
*** 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]
将不胜感激任何解决此问题的建议...
解决方案
推荐阅读
- azure - 在部署时触发 Azure 中的 webhook?
- javascript - 访问对自己类中的类的引用
- php - 如何测试 Callable 参数是否会返回带有反射的字符串?
- erlang - Task.start Elixir 中的奇怪行为
- javascript - 创建设计文档后如何建立云索引?
- mysql - 根据某些其他行标准对排序日期进行编号
- sql-server - SELECT 查询与 SELECTS 的子查询一起工作正常,但是当 DELETE 应用于同一个子查询时,它不起作用
- python - 掷骰子的 Python 程序计算出现 6 之前的掷骰数
- browser - 浏览器后退按钮与刷新按钮
- mysql - 这里的语法错误是什么?