splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Update detection and interaction code to use Selenium's API

Open j7an opened this issue 7 years ago • 0 comments

I've noticed the detection / interaction code of Splinter doesn't always work as expected even with timeouts set. We should try to use Selenium's API (Explicit Wait & Expected Condition) as much as possible for all detections and interactions since Selenium is updated frequently e.g.

from selenium.webdriver.support import expected_conditions as EC

wait = WebDriverWait(driver, 10)
wait.until(EC.text_to_be_present_in_element((By.ID, 'someid'), 'some_text'))

https://youtu.be/Ap4lmIiCCnk

Referencing discussion here https://github.com/cobrateam/splinter/issues/597#issuecomment-377111031

j7an avatar Apr 16 '18 01:04 j7an