-
Couldn't load subscription status.
- Fork 573
Fix functional tests failed (android, appium_tests) #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| self.driver.find_element_by_xpath(xpath).click() | ||
|
|
||
| el = self.driver.find_element(By.ID, 'com.example.android.apis:id/left_text_edit') | ||
| el = self.driver.find_element(MobileBy.ID, 'com.example.android.apis:id/left_text_edit') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]
Python client has find_element_by_id, too.
| SLEEPY_TIME = 3 | ||
|
|
||
|
|
||
| def wait_element(driver, locator, value, timeout=SLEEPY_TIME): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait_for_element?
| self.driver.find_element_by_xpath("//android.widget.TextView[@text='App']").click() | ||
| self.driver.find_element_by_xpath("//android.widget.TextView[@text='Activity']").click() | ||
| self.driver.find_element_by_xpath("//android.widget.TextView[@text='Custom Title']").click() | ||
| xpath = "//android.widget.TextView[@text='App']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be done in a loop
| :param timeout: Maximum time to wait the element. If time is over, TimeoutException is thrown | ||
| :return: None | ||
| ''' | ||
| WebDriverWait(driver, timeout).until( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does presence_of_element_located returns an element?
If so, what about returning the result of WebDriverWait as this method's returns value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, will do.
Changes
Results
Verified with Python2/3 and emulator(AndroidP)