class TestNetwork: def setup(self): self.driver = init_driver() self.network_page = NetWorkPage(self.driver) def test_dw(self): self.network_page.click_normal_operation() def test_mobile_network_2g(self): self.network_page.click_first_network() self.network_page.click_2g() def test_mobile_network_3g(self): self.network_page.click_first_network() self.network_page.click_3g() def teardown(self): self.driver.quit()
def network(self): return NetWorkPage(self.driver)
def setup(self): self.driver = init_driver() self.network_page = NetWorkPage(self.driver)
class TestNetwork(): def setup(self): self.driver = init_driver() self.network_page = NetWorkPage(self.driver) def teardown(self): self.driver.close_app() self.driver.quit() def test_mobiles_network_2g(self): self.network_page.click_network() self.network_page.click_mobile() self.network_page.click_advanced() self.network_page.click_preferred() self.network_page.click_2g() def test_mobiles_network_3g(self): self.network_page.click_network() self.network_page.click_mobile() self.network_page.click_advanced() self.network_page.click_preferred() self.network_page.click_3g()
def setup(self): self.driver = init_driver() self.networkPage = NetWorkPage(self.driver) self.baseAction = BaseAction(self.driver)
class TestNetwork: def setup(self): self.driver = init_driver() self.networkPage = NetWorkPage(self.driver) self.baseAction = BaseAction(self.driver) def test_network_2G(self): # 点击更多 self.networkPage.click_more() # 点击移动网络 self.networkPage.click_network() # 点击首选网络类型 self.networkPage.click_first_type() # 点击2G self.networkPage.click_2G() def test_network_3G(self): self.networkPage.click_more() self.networkPage.click_network() self.networkPage.click_first_type() self.networkPage.click_3G()