Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for Chrome Dev Protocols #1208

Answered by mdmintz
taruntechno asked this question in Q&A
Discussion options

Does seleniumbase supports chrome dev protocols for eg . View console logs and get network traffic and performance.

You must be logged in to vote

Hi @taruntechno , yes, as seen from examples such as https://github.com/seleniumbase/SeleniumBase/blob/master/examples/user_agent_test.py , you can run CDP commands using self.driver.execute_cdp_cmd(). Example:

self.driver.execute_cdp_cmd(
 "Network.setUserAgentOverride", {
 "userAgent": "Mozilla/5.0 "
 "(Nintendo Switch; WifiWebAuthApplet) "
 "AppleWebKit/606.4 (KHTML, like Gecko) "
 "NF/6.0.1.15.4 NintendoBrowser/5.1.0.20393"
 }
)

Replies: 1 comment 1 reply

Comment options

Hi @taruntechno , yes, as seen from examples such as https://github.com/seleniumbase/SeleniumBase/blob/master/examples/user_agent_test.py , you can run CDP commands using self.driver.execute_cdp_cmd(). Example:

self.driver.execute_cdp_cmd(
 "Network.setUserAgentOverride", {
 "userAgent": "Mozilla/5.0 "
 "(Nintendo Switch; WifiWebAuthApplet) "
 "AppleWebKit/606.4 (KHTML, like Gecko) "
 "NF/6.0.1.15.4 NintendoBrowser/5.1.0.20393"
 }
)
You must be logged in to vote
1 reply
Comment options

Thanks a lot

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /