0
I am programming a boot that interacts with a google page (google Meet) for this I am Selenium, but when I use the command 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"}
probably not error the page still not have loaded because I put a 20 seconds Sleep
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)