如何使用机器人框架打开开发人员工具



如何使用机器人框架打开开发人员工具,然后切换到网络选项卡并从网络选项卡获取URL。我在下面写了代码,但它什么也没做。有人可以帮我吗

Open Browser    https://my.doe.nh.gov/myNHDOE/Login/Login.aspx  ie
Maximize Browser Window     
Input Text  //*[@id='ctl00_MenuingMasterContent_txtAccountID']  uname
Input Text  //*[@id='ctl00_MenuingMasterContent_txtPassword']   pwd
Click Element   //*[@id='ctl00_MenuingMasterContent_btnLogin_lbCenter'] 
Sleep   5s  
Press Key   //*[@id='ctl00_MenuingMasterContent_ctl03_lnkLink1']    \123

这是不可能的。来自 Chrome 驱动程序帮助中心(请参阅链接(

https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing

当您打开 DevTools 窗口时,ChromeDriver 会自动断开连接。当 ChromeDriver 收到命令时,如果断开连接,它将尝试关闭 DevTools 窗口并重新连接。

如果您需要检查 DevTools 中的某些内容,您现在能做的最好的事情就是暂停测试,这样 ChromeDriver 就不会关闭 DevTools。在 Chrome 中完成检查后,您可以取消暂停测试,ChromeDriver 将关闭窗口并继续。

相关内容