def setUpClass(cls): browser = BrowserEngine(cls) cls.driver = browser.open_browser(cls) login = Login(cls.driver) login.skip_or_login() homepage = HomePage(cls.driver) homepage.wireNetwork_click() time.sleep(5)
def test_001_click_wireNetwork(self): homepage = HomePage(self.driver) homepage.wireNetwork_click() time.sleep(1) try: assert "有线网络" in self.driver.find_element_by_class_name( "module-title").text print("test001 pass") homepage.get_screenshot_as_file() except Exception as e: print("test001 fail", format(e))