简体   繁体   中英

How do I open the DevTools in google Chrome using Selenium python?

Is this even possible I saw one other post about this topic and its solution was to use pyautogui but I can't do that because I need the keys to only register for the chromedriver.

I have tried the typical

driver.find_element(By.CLASS_NAME,"body").send_keys(Keys.F12)

but to no avail I had also tried

driver.find_element(By.CLASS_NAME,"body").send_keys(Keys.CONTROL + Keys.SHIFT + "i")

and this also did not work as well.

There are some other workarounds depending on what your goal is.

If you need to open devtools to handle requests I would recommend using Selenium Wire

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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