def test_cbmd(self): try: mainpage = MainPage(self.driver) mainpage.Printcancel() except Exception as e: self.testCaseInfo.errorinfo = e loggerdetail.warning("Error msg: {}".format(e)) assert False else: self.testCaseInfo.result = "Pass"
class TestLogin: def setup_class(self): self.driver = StartDriver() self.base = BaseFun(self.driver) self.login = LoginPage(self.driver) self.mape = MainPage(self.driver) # def test001(self): self.mape.go_to_personal_center() self.login.login_click() self.login.chg_to_pwd_login() self.login.click_tel() self.login.input_tel("18244211570") self.login.click_pwd() self.login.input_pwd("123456") self.login.login()
def test_logout_happypath(self): mp = MainPage(self.driver) mp.clickLogoutButton() mp.VerifySignInButton()
def test_adding_to_cart(self): mp = MainPage(self.driver) mp.ClickOnLogo() mp.ClickOnProduct() mp.SetQuantity()
def tearDown(self): mp = MainPage (self.driver) mp.clickLogoutButton() mp.VerifySignInButton()
def __init__(self, driver): MainPage.__init__(self, driver) self.goto_mine_page()
def setup_class(self): self.driver = StartDriver() self.base = BaseFun(self.driver) self.login = LoginPage(self.driver) self.mape = MainPage(self.driver)