I need to open the inspect element in a chrome browser for a project I'm working on and I can't figure out if it's no possible or what. If I try and just use F12 like so:
action = ActionChains(driver)
action.send_keys(Keys.F12)
action.perform()
Then nothing happens at all. Same results if I try using the full shortcut (Control+Shift+i):
action = ActionChains(driver)
action.key_down(Keys.CONTROL)
action.key_down(Keys.SHIFT)
action.send_keys('i')
action.perform()
action.key_up(Keys.SHIFT)
action.key_up(Keys.CONTROL)
action.perform()
If I use a different shortcut, such as Control+a to highlight everything on a given page, it works. I've thought about the possibility of somehow right-clicking and then having it click on the inspect button, but I'm unsure how feasible that is. If anyone has any tips at all I'd really appreciate it.
I don't know if I'm just doing something entirely wrong or if maybe it just isn't possible but either way I'd like to get some closure at the least.