0

I have tried many ways to click on 'Ask to join' button on google meet using selenium. Here are some ways i already tried if you know any other way please help me out. tried 1 tried 2 tried 3

code snippet that i already tried:

    btn = browser.find_element((By.XPATH, "//span[contains(text(),'Ask to join')]"))

    browser.execute_script("arguments[0].click();", btn)
try:
    join_button = WebDriverWait(browser, 36).until(EC.presence_of_element_located((By.XPATH, "//span[contains(text(),'Join now')]")))
    browser.execute_script("arguments[0].click();", join_button)
except TimeoutException:
    try:
        join_button = WebDriverWait(browser, 36).until(EC.presence_of_element_located((By.XPATH, "//span[contains(text(),'Ask to join')]")))
        browser.execute_script("arguments[0].click();", join_button)
    except TimeoutException:
            print("Couldn't join Google Meet. Are you sure you have the right code?")
join_butt = WebDriverWait(browser, delay).until(EC.presence_of_element_located((By.XPATH, "//span[contains(text(),'Ask to join')]")))
driver.execute_script("arguments[0].click();", join_butt)

thanks in advance!!!!!!

Javed Ali
  • 23
  • 4
  • Have you tried locating the element just by its class name? – TejasOS Nov 29 '20 at 18:45
  • Include the html element and if it's any iframes. – Arundeep Chohan Nov 30 '20 at 02:29
  • @HelloWorld i have tried using the class name but it say unable to locate element. 'Ask to join' button is dynamically generated that way the class throw this error. – Javed Ali Dec 01 '20 at 12:03
  • @arundeepchohan yes i have tried using html but no luck with that. – Javed Ali Dec 01 '20 at 12:04
  • I don't think you have tried this solution: https://stackoverflow.com/questions/63873200/how-to-click-on-the-ask-to-join-button-within-https-meet-google-com-using-sele?noredirect=1&lq=1 – TejasOS Dec 02 '20 at 04:04
  • @HelloWorld Yes i have tried that too you can see that in the question (last code). it throw a Timeoutexceptions and i dont know to handle that. – Javed Ali Dec 03 '20 at 09:03

0 Answers0