I have a javascript which I want to put in console when page loaded but i am unable to open console using selenium in python I can access devtoos using this --auto-open-devtools-for-tabs
but not able to open console.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException
import os
import time
from urllib.parse import quote_plus
driverPath = "chromedriver.exe"
dataPath = "whatsapp-assistant-bot-master/Data"
options = webdriver.ChromeOptions()
options.add_argument("--user-data-dir=" + dataPath)
options.add_argument("--auto-open-console-for-tabs=" + dataPath)
driver = webdriver.Chrome(options=options, executable_path=driverPath)
driver.get('http://google.com')
print('Please Scan the QR Code and press enter')
driver.find_element_by_id("gsr").send_keys(Keys.F12)
input()
driver.quit()