clf = self.isElementPresent(driver,"xpath","//android.view.View[@resource-id='com.jifen.qukan:id/azx']")
if clf is True:
print(u"所查找的元素存在")
Ele = driver.find_element_by_xpath("//android.view.View[@resource-id='com.jifen.qukan:id/azx']")
TouchAction(driver).tap(Ele).perform().release()
else:
print(u"所查找的元素不存在")
try:
if driver.find_element_by_xpath("//android.widget.TextView[@text='多语言']").is_displayed(): # 判断是否有多语言录按钮,如果有result为False否则为Ture
result = True
except Exception:
result = False
self.assertEqual(result, True) # 断言