Ignacio Contreras Pinilla
Reputation
Top tag
Next privilege 150 Rep.
Create new tags
Badges
4
Newest
 Supporter
Impact
~20k people reached

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Jul
17
comment Quicker way to assert that an element does not exist
@user1411110 you're welcome :)
Jul
17
comment Quicker way to assert that an element does not exist
@SamWoods yep (that's why I say ``you could save the previous search```). I was in a hurry then and later I forgot to update the answer, thanks for the heads up!
Jul
17
comment Quicker way to assert that an element does not exist
Cool. Now you should look for an equivalent of isDisplayed() (if an element is not displayed it will throw the exception you were using when clicked) for Python as I said in the answer :)
Jul
17
comment Quicker way to assert that an element does not exist
And it doesn't work?
Jul
17
comment Quicker way to assert that an element does not exist
isEmpty() is a Java method for lists. In Python, I think you should check the length of the list (len(driver.find_elements(...)) == 0)? I cannot check this for myself right now.