Пример #1
0
 def brfore_func(self):
     self.driver = get_driver()
     self.add_page = AddPage(self.driver)
     self.setting_page = SettingPage(self.driver)
     yield
     time.sleep(3)
     self.driver.quit()
Пример #2
0
class TestDisplaySearch:

    def setup(self):
        self.driver = init_driver()
        self.display_page = DisplayPage(self.driver)
        self.display_search_page = DisplaySearchPage(self.driver)
        self.setting_page = SettingPage(self.driver)

    # @pytest.mark.skipif(True, reason='未完成方法')
    def test_display_search(self):
        self.setting_page.click_display_button()
        self.display_page.click_search_button()
        self.display_search_page.input_search()
        self.display_search_page.click_back_button()
Пример #3
0
class TestSms:
    def setup_class(self):
        #1.初始化driver
        self.driver = get_driver()
        #2.初始化smspage类
        self.settingpage = SettingPage(self.driver)

    def teardown_class(self):
        # 1 退出driver
        self.driver.quit()
        #点击搜索圈

    @allure.step(title='测试设置搜索')
    @allure.attach("搜索,增加")
    def test_click_search_btn(self):
        # 1.点击新增按钮
        self.settingpage.click_search_btn()

    @pytest.mark.parametrize("content", get_data())
    #向搜索框内输入1/2/3
    def test_input_number_search(self, content):
        self.settingpage.input_number_search(content)
        #按返回键
    def test_click_back_butn(self):
        self.settingpage.click_back_butn()
Пример #4
0
class TestAdd(object):
    # 通讯录测试类
    @pytest.fixture(autouse=True)
    def brfore_func(self):
        self.driver = get_driver()
        self.add_page = AddPage(self.driver)
        self.setting_page = SettingPage(self.driver)
        yield
        time.sleep(3)
        self.driver.quit()

    @pytest.mark.parametrize('name,phone', build_address_func())
    def test_func(self, name, phone):
        # 点击添加按钮
        self.setting_page.click_my_btn()
        # 点击本地保存按钮
        self.setting_page.click_local_save()
        # 输入姓名
        self.add_page.input_name(name)
        # 输入电话
        self.add_page.input_phone(phone)
        # 发送返回键
        self.driver.keyevent(4)

        # # 点击添加按钮
        # self.setting_page.click_my_btn()
        # # 点击本地保存按钮
        # self.setting_page.click_local_save()
        # # 输入姓名
        # self.add_page.input_name('李白')
        # # 输入电话
        # self.add_page.input_phone('123456')
        # # 发送返回键
        # self.driver.keyevent(4)


# 烘干机会根据韩国
Пример #5
0
 def setup_class(self):
     self.driver = webdriver.Chrome()
     self.Login_Page = LoginPage(self.driver)
     self.Setting_Page = SettingPage(self.driver)
     self.driver.maximize_window()
     self.Login_Page.get(self.url + r"login")
     self.Login_Page.user_input = "test"
     self.Login_Page.password_input = "123456zxA"
     self.Login_Page.login_button.click()
     sleep(self.sleep_time)
     self.Login_Page.select_hospital.click()
     self.Login_Page.select_ensure.click()
     sleep(self.sleep_time)
     self.Setting_Page.setting_button.click()
     sleep(self.sleep_time)
     pass
Пример #6
0
class TestSetting():
    def setup(self):

        self.driver = init_driver(base.apppackage, base.appactivity)
        self.setting_page = SettingPage(self.driver)

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

    @pytest.mark.parametrize("content", get_setting_data())
    def test_setting(self, content):
        self.setting_page.click_search()
        self.setting_page.input_content(content)
        self.setting_page.click_back()
Пример #7
0
class TestSitting:
    def setup_class(self):
        self.driver = init_driver()
        self.setting_page = SettingPage(self.driver)

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

    # @pytest.mark.parametrize('test_id,input_text', input_data())
    # def test_setting(self, test_id, input_text):
    #     sp = SettingPage(self.driver)
    #     print("test_id:", test_id)
    #     sp.input_src_text()

    @pytest.mark.parametrize('content', input_data())
    def test_setting(self, content):
        self.setting_page.click_search()
        self.setting_page.input_src_text(content)
        self.setting_page.click_back()
Пример #8
0
 def setting_page(self):
     # 设置页面
     return SettingPage(self.driver)
Пример #9
0
 def setting(self):
     # 返回设置页面
     return SettingPage(self.driver)
Пример #10
0
 def get_setting_page_obj(self):
     return SettingPage(self.driver)
Пример #11
0
 def get_setting_page(self):
     """返回设置的页面对象"""
     return SettingPage(self.driver)
Пример #12
0
    def setup(self):

        self.driver = init_driver(base.apppackage, base.appactivity)
        self.setting_page = SettingPage(self.driver)
Пример #13
0
 def setup_class(self):
     self.driver = init_driver()
     self.setting_page = SettingPage(self.driver)
Пример #14
0
 def create_SettingPage(self):
     return SettingPage(self.driver)
Пример #15
0
 def get_setting_page_instance(self):
     return SettingPage(self.driver)
Пример #16
0
 def setting_page(self):
     """设置页"""
     return SettingPage(self.driver)
Пример #17
0
 def setup_class(self):
     #1.初始化driver
     self.driver = get_driver()
     #2.初始化smspage类
     self.settingpage = SettingPage(self.driver)
Пример #18
0
 def setup(self):
     self.driver = init_driver()
     self.display_page = DisplayPage(self.driver)
     self.display_search_page = DisplaySearchPage(self.driver)
     self.setting_page = SettingPage(self.driver)
Пример #19
0
 def setting(self):
     return SettingPage(self.driver)
 def enter_in_start_page(self, driver, host, pkUser, pkCompany):
     '''进入起始页首页'''
     HomePage(driver).open(host, pkUser, pkCompany)
     setting = SettingPage(driver)
     return setting