Skip to content

Right code to raise StaleElementReferenceException#51

Open
QiliWu wants to merge 1 commit intoREMitchell:masterfrom
QiliWu:patch-1
Open

Right code to raise StaleElementReferenceException#51
QiliWu wants to merge 1 commit intoREMitchell:masterfrom
QiliWu:patch-1

Conversation

@QiliWu
Copy link
Copy Markdown

@QiliWu QiliWu commented Sep 26, 2017

elem ==driver.find_element_by_tag_name('html') will just return True or False, but will never raise a StaleElementReferenceException.
It will raise a StaleElementReferenceException when using elem to do something while it is not the original one due to the page changing.

elem ==driver.find_element_by_tag_name('html') will just return True or False, but will never raise a StaleElementReferenceException.
It will raise a StaleElementReferenceException when using elem to do something while it is not the original one due to the page changing.
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