Base页具体编写
在Base页创建BasePage类
from appium.webdriver.common.touch_action import TouchAction
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class BasePage():
def __init__(self,driver):
self.driver=driver
def find_element(self,loc):
#显示等待定位元素
return WebDriverWait(self.driver,timeout=10,poll_frequency=0.5).until(EC.presence_of_element_located(loc))
#点击方法
def click_element(self,loc):
self.find_element(loc).click()
#tap点击
def tap_Action(self