简体   繁体   English

通过Selenium Webdriver(JS绑定)以编程方式与Firefox开发人员工具进行交互

[英]Interacting with Firefox developer tools through Selenium Webdriver (JS Binding) programatically

By using the below lines, I am able to launch a Firefox browser window and also the performance tab (Shift+F5) of the developer tool.. 通过使用以下几行,我可以启动Firefox浏览器窗口以及开发人员工具的性能标签(Shift + F5)。

driver.get("about:blank");
driver.findElement(webdriver.By.css('body')).sendKeys(webdriver.Key.SHIFT+webdriver.Key.F5);

But not able to interact with the launched developer tool window. 但无法与启动的开发人员工具窗口进行交互。 By interaction I mean, clicking on the elements inside it... Is there a way to do it? 我的意思是互动,单击其中的元素...有办法吗?

Developer tools window is not a part of a DOM and hence you cannot control it with Selenium. 开发人员工具窗口不是DOM的一部分,因此您无法使用Selenium控制它。

If you really need to control it, you can use another automation tools together with Selenium. 如果确实需要控制它,则可以将其他自动化工具与Selenium一起使用。 For example Sikuli . 例如Sikuli

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM