splinter
splinter copied to clipboard
Update detection and interaction code to use Selenium's API
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