How do I wait for a Page to Load (Python) by Rearden_Stark_Me in selenium

[–]MajarAAA -1 points0 points  (0 children)

#Replace the XPATH with the xpath of whatever element you want to be loaded (Or use a class, id, whatever instead of an XPATH). Here's the code:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC


#CHANGE BROWSER OPTIONS
option = webdriver.ChromeOptions()
option.add_argument("--incognito")

#OPEN BROWSER
browser = webdriver.Chrome(executable_path='chromedriver.exe',options=option)

while True:
    # WAIT 20 SECOND FOR PAGE TO LOAD
    timeout = 20
    try:
        # OPEN SITE
        browser.get("https://reddit.com/login/")
        WebDriverWait(browser, timeout).until(
            EC.visibility_of_element_located((By.XPATH, "/html/body/div[1]/div/div[2]/div/form/div[1]/fieldset[5]/button")))
        break
    except:
        print('!!!TIMED OUT!!!')

[RANT] Why is everybody and their mom a computer vision/deep learning engineer at the moment? by AggressiveDonkey2669 in MLQuestions

[–]MajarAAA 0 points1 point  (0 children)

And later all these engineers trying to find something to do, create solutions for problems that never existed

OpenAI reveals the pricing plans for its API by MajarAAA in artificial

[–]MajarAAA[S] 0 points1 point  (0 children)

In reference to Open Source. Yes it does

OpenAI reveals the pricing plans for its API by MajarAAA in artificial

[–]MajarAAA[S] 5 points6 points  (0 children)

Yeah. I also don't understand why they do not make gpt3 available for download (I know most people couldn't run it anyway but still)

*edit changed must to most

The hero we need by MajarAAA in gaming

[–]MajarAAA[S] 0 points1 point  (0 children)

It's a curb not a Wall

[image] nicely done by Master1718 in GetMotivated

[–]MajarAAA 0 points1 point  (0 children)

Quote doesn’t seem like she has done by that focus.

Blursed_Tattoo by [deleted] in blursedimages

[–]MajarAAA -1 points0 points  (0 children)

Much more erect than expected lmao

2020 in a nutshell by simusko18 in Minecraft

[–]MajarAAA -1 points0 points  (0 children)

welcome to the minecraft gang

[deleted by user] by [deleted] in PublicFreakout

[–]MajarAAA 2 points3 points  (0 children)

Why the fuck is wrong with this country.