class AddcmPage: def __init__(self, driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path, self.driver) def operateap(self): self.operate.check_operate_type() def home(self): self.operate.back_home()
class SortcmPage: def __init__(self,driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path,self.driver) def sortlist(self): self.operate.check_operate_type() def home(self): self.operate.back_home()
class UserRegisterPage: def __init__(self, driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path, self.driver) def register(self): self.operate.check_operate_type() def home(self): self.operate.back_home()
class UserLoginPage: def __init__(self, driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path, self.driver) def login(self): self.operate.check_operate_type() def home(self): self.operate.back_home()
class SearchpdPage: def __init__(self, driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path, self.driver) def operateap(self): self.operate.check_operate_type() def home(self): self.operate.back_home() # 测试用 忽略 # from public.GetDriver import mydriver # driver = mydriver() # # aa = SearchpdPage(driver) # aa.operateap()
class TestClickAge: def __init__(self, driver): self.path = yamlpath self.driver = driver self.operate = Operate(self.path, self.driver) self.base = BaseOperate(self.driver) def clickage(self): self.base.swipe_up() self.operate.check_operate_type() logger.info('购买成功') self.base.screenshot() # assert def home(self): self.operate.back_home() # from public.GetDriver import mydriver # x = TestClickAge(driver=mydriver()) # x.clickage()