stormcph
stormcph

Reputation: 1

run javascript in already open tab through the inspect element console using python?

I'm attempting to execute code within the console of Inspect Element using Python, within an already open tab window. However, my code opens a new browser window instead.

To clarify, I wrote an example to demonstrate what I'm trying to achieve, but it resulted in the opening of a new browser window.

this is my experimental code:

from selenium import webdriver from selenium.webdriver.common.by import By

driver = webdriver.Firefox()

driver.get("www.example.com")

start_button = driver.find_element(By.ID, "ctl00$ContentPlaceHolder1$ImageButton_StartNormal") start_button.click()

Upvotes: 0

Views: 61

Answers (0)

Related Questions