cobrateam/splinter

Update detection and interaction code to use Selenium's API

Open

#604 opened on Apr 16, 2018

View on GitHub
 (0 comments) (3 reactions) (0 assignees)Python (509 forks)auto 404
help wanted

Repository metrics

Stars
 (2,754 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide