I'm programming a boot that interacts with a google page (google meet) for this I'm using selenium webdriver, but when i run the code find_element
in python it gives the following error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element:
{"method":"xpath","selector":"/html/body/div[1]/div[3]/div/div[2]/div[3]/div/span/span"}
here is my code:
import os
from datetime import date
from datetime import datetime
from time import sleep
import selenium
from selenium import webdriver
hora = 360
driver = selenium.webdriver.Chrome(r"C:\Users\adelson\Desktop\chromedriver")
def segunda():
if now.hour == 21:
os.startfile('link da reunião')
sleep(20)
my_button = driver.find_element_by_xpath("/html/body/div[1]/div[3]/div/div[2]/div[3]/div/span/span")
my_button.click()
sleep(hora)
while True:
now = datetime.now()
data = date(now.year, now.month, now.day)
#segunda
if data.isoweekday() == 1:
segunda()
sleep(120)
driver.get()
to load a page. Does Chrome load the page by default when it starts?os.startfile('link da reunião')
withdriver.get(...)
and post back with the results.