samedi 28 mars 2015

Wait Fails on Selendroid tests

I'm working on a set of tests using Selendroid with python, the question is: Is there a wait to made selendroid wait for some elements or condition to continue executing the test?. Here is an example i'm talking about



def test_google_login(self):
self.driver.get('and-activity://com.package.name.MainActivity')
self.driver.get('and-activity://admin.ConfigActivity')
#self.driver.implicitly_wait(10)
ivAppIcon = self.driver.find_element_by_id('ivAppIcon')
try:
lv = WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.ID, "lvProviders")))
except Exception:
self.driver.quit()


On this example i'm trying to give some time to animation to finish and then look for the list view, But for some estrange reason the test fails or made app to fail.


Thanks


Aucun commentaire:

Enregistrer un commentaire