appium版本 1.6.3
desired_caps['automationName']='uiautomator2'
def _find_toast(self,message,timeout,poll_frequency,driver):
message = '//*[contains(@text,\'{}\')]'.format(message)
element = WebDriverWait(driver,timeout,poll_frequency).until(expected_conditions.presence_of_element_located((By.XPATH,message)))
print element
message = '//*[contains(@text,\'{}\')]'.format(message)
element = WebDriverWait(driver,timeout,poll_frequency).until(expected_conditions.presence_of_element_located((By.XPATH,message)))
print element