Esempio n. 1
0
class TestSet(object):
    def setup_class(self):
        self.driver = get_driver('com.android.settings', '.Settings')
        self.page = Page(self.driver)

    def teardown_class(self):
        self.driver.quit()

    def test_network(self):
        self.page.set_page().click_more_btn()
        self.page.more_page().click_mobile_btn()
        self.page.mobile_page().select_2G()
        assert '2G' in self.page.mobile_page().get_summary_ret_list()
Esempio n. 2
0
class TestSet(object):
    def setup_class(self):
        self.driver = get_driver('com.android.settings', '.Settings')
        self.page = Page(self.driver)

    def teardown_class(self):
        self.driver.quit()

    @pytest.fixture(scope='class', autouse=True)
    @allure.step('点击搜索')
    def click_set_search_btn(self):
        self.page.set_page().click_search_btn()

    @pytest.mark.parametrize('test_num,text,exp', data_test())
    @allure.step('测试设置搜索')
    @pytest.allure.severity(pytest.allure.severity_level.CRITICAL)
    def test_set_search(self, test_num, text, exp):
        allure.attach(test_num, '输入数据:%s,预期:%s' % (text, exp))
        self.page.set_page().input_mes_search_bar(text)
        assert exp in self.page.set_page().get_search_ret_list()