Skip to content

Support for Chrome Dev Protocols #1208

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

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

You must be logged in to vote
1 reply
@taruntechno
Comment options

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
2 participants