My current goal is to execute a script to my selenium browser that declares a var and then using DevTools access the variable in console log.
Here is the conflicting script:
from selenium import webdriver
from time import sleep
chromePath = 'Selenium Injection\chromedriver.exe'
driver = webdriver.Chrome(executable_path=chromePath)
driver.get('https://www.google.com')
driver.execute_script(
"var test = 'Test Now';"
"return test"
)
Upon execution I try to access the test variable and I get an error.