How to open Chrome Developer console in Selenium WebDriver using JAVA

前端 未结 4 2247
不思量自难忘°
不思量自难忘° 2020-11-28 14:05

I want to ask how to open the Chrome developer Console during selenium tests execution. Currently, when tests are executing, and I open the console manually hitting F12, the

4条回答
  •  自闭症患者
    2020-11-28 15:00

    Note: this answer does not apply to current versions of Chrome.

    You can't. The Chrome driver uses the Chrome remote debugging protocol to communicate with the browser. This is the same protocol that the developer console uses also. Unfortunately, Chrome is designed so that only one client can be attached using the protocol at a time, so that means either the developer tools, or the driver, but not both simultaneously.

提交回复
热议问题