Difference Between Ec.element_to_be_clickable And Ec.presence_of_element_located To Click() An Element
I'm getting TimeoutExceptions while clicking an element intermittently. I have tried with explicit waits and time.sleep(). It works for a while and again i get exceptions. I want t
Solution 1:
Based on official documentation from selenium and code implementation.
presence_of_element_located(locator)
definition:
An expectation for checking that an element is present on the DOM of a page. This does not necessarily mean that the element is visible. locator - used to find the element returns the WebElement once it is located
element_to_be_clickable(locator)
:
An Expectation for checking an element is visible and enabled such that you can click it.
Expected conditions executes the condition in a loop for a defined timeout period. It will poll until true
is returned for the condition. If false
is returned, it will continue the loop until maximum timeout is reached.
Post a Comment for "Difference Between Ec.element_to_be_clickable And Ec.presence_of_element_located To Click() An Element"