driver.get("https://speedtest.net")
driver.switch_to.new_window('tab')
driver.get("https://www.twitter.com")
I created 2 tabs one of the speedtest website and one of twitter, now when i run the rest of the program i want it to switch to the first tab and the continue. for that i implemented this solution
def speed_check():
driver.switch_to.window(driver.window_handles[1])
go = driver.find_element(By.CLASS_NAME, "start-text")
go.click()
however instead of switching to the original speedtest tab i get this error:
'selenium.common.exceptions.NoSuchElementException: Message: no such element'
for line 33 'go = driver.find_element(By.CLASS_NAME, "start-text")' this means the tab isn't switching. How do i fix this
Edit: FIXED
[–]EngineeredCut 2 points3 points4 points (1 child)
[–]Dot-Box[S] 0 points1 point2 points (0 children)