Skip to content

Update 3-javascriptRedirect.py#49

Open
AaronSolomon wants to merge 1 commit intoREMitchell:masterfrom
AaronSolomon:patch-4
Open

Update 3-javascriptRedirect.py#49
AaronSolomon wants to merge 1 commit intoREMitchell:masterfrom
AaronSolomon:patch-4

Conversation

@AaronSolomon
Copy link
Copy Markdown

The following line
elem == driver.find_element_by_tag_name("html")
will only generate True (the first 4 iterations) or False (the remaining 16 iterations).
This statement does not trigger the StaleElementReferenceException, so the function always exits after 10 seconds and prints the "Timing out" message.
My suggestion is to access an element attribute (e.g., "innerHTML"). This will trigger the exception after the webpage is directed.

The following line 
elem == driver.find_element_by_tag_name("html")
will only generate True (the first 4 iterations) or False (the remaining 16 iterations).  
This statement does not trigger the StaleElementReferenceException, so the function always exits after 10 seconds and prints the "Timing out" message.
My suggestion is to access an element attribute (e.g., "innerHTML").  This will trigger the exception after the webpage is directed.
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

Successfully merging this pull request may close these issues.

1 participant