cobrateam/splinter
View on GitHubUpdate detection and interaction code to use Selenium's API
Open
#604 opened on Apr 16, 2018
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'))
Referencing discussion here https://github.com/cobrateam/splinter/issues/597#issuecomment-377111031