Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies in timing #8

Open
Erickln opened this issue Jul 2, 2022 · 2 comments
Open

Inconsistencies in timing #8

Erickln opened this issue Jul 2, 2022 · 2 comments

Comments

@Erickln
Copy link

Erickln commented Jul 2, 2022

In

loginElem = WebDriverWait(browser, 10).until(
        EC.element_to_be_clickable(
            (By.LINK_TEXT, "Login to vote"))
    )
    loginElem.click()
    print('[click] Login to Vote')

crashes, it seems that sometimes it take too long to redirect to to the login page and the program crashes.

However sometimes it works, but it has the same problems in

time.sleep(DELAY)
        browser.refresh()
        # Wait for redirects until authorize page
        WebDriverWait(browser, TIMEOUT).until(
            EC.url_contains('https://discord.com/oauth2/authorize')
        )
        print('[wait] Authorize page')

It seems that it does not detect when the URL properly contains the string

@0xfinder
Copy link
Owner

0xfinder commented Jul 2, 2022

if it takes too long to redirect, it could be your internet issue - you can try increasing the timeout which is currently 10s now

for the 2nd part, i just tested and it's working fine for me, if your url you get is different you could try replacing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Erickln @0xfinder and others