class TestXueqiu(object): def setup(self): self.driver = webdriver.Remote(desired_capabilities=DesiredCapabilities.CHROME) self.driver.implicitly_wait(10) self.driver.get("https://xueqiu.com") self.main = MainPage(self.driver) def teardown(self): self.driver.quit() def test_search(self): self.main.search("alibaba").follow("1688")
def loginSuccessByPassword(self, account, password): from page_object.page.MainPage import MainPage return MainPage()
def main(cls): cls.getClient().restart_app() return MainPage()
def main(cls): #driver的类型不受限制 cls.getClient().restart_app() #重启之后仍然是首页 return MainPage()
def main(cls): # 这里要改成cls,不应该是self AndroidClient.restart_app() return MainPage()
def test_price(self): main = MainPage() assert main.gotoSelected().getPriceByName("科大讯飞") == 28.83
def main(self): AndroidClient.restart_app() return MainPage()
def homepage(cls): cls.getClient().restart_app() return MainPage()
def main(cls): cls.getClient().install_app() return MainPage()
def main(cls): # cls.driver=BasePage.driver cls.getClient().restartApp() return MainPage()
def setup(self): self.driver = webdriver.Remote(desired_capabilities=DesiredCapabilities.CHROME) self.driver.implicitly_wait(10) self.driver.get("https://xueqiu.com") self.main = MainPage(self.driver)