Esempio n. 1
0
class TestCase():
    def setup(self):
        self.mainpage = MainPage()

    def test_shanchu(self):

        result = self.mainpage.click_txl().person_data().editcy().search()
        assert result == False
Esempio n. 2
0
 def editcy(self):  #  编辑成员
     edit_locator = ("id", "b91")
     queding_locator = ("xpath", '//*[contains(@text,"确定")]')
     find_element(self.driver, edit_locator).click()
     find_by_scroll(self.driver, "删除成员").click()
     find_element(self.driver, queding_locator).click()
     from page.mainpage import MainPage
     return MainPage(self.driver)
Esempio n. 3
0
    def loggin(self, uid, pwd):

        with allure.step("输入账号"):
            self.driver.find_element_by_id("uid").send_keys(uid)
        with allure.step("输入密码"):
            self.driver.find_element_by_id("pwd").send_keys(pwd)
        with allure.step("双击机构代码"):
            self.comcode = self.driver.find_element_by_id("comcode")
            ActionChains(self.driver).double_click(
                self.comcode).perform()  ##执行链中的所有操作
        with allure.step("点击登录"):
            self.driver.find_element_by_id("btn").click()
        return MainPage(self.driver)
Esempio n. 4
0
 def backtohome(self):
     self.driver.back()
     from page.mainpage import MainPage
     return MainPage()
Esempio n. 5
0
 def goto_main(self, driver):
     print("进goto_main----------------")
     return MainPage(driver)
Esempio n. 6
0
 def setup_class(cls):
     cls.maillistpage = MainPage().to_maillist()
     cls.maillistpage.logger.info('\n\n' + '*' * 20 + '测试删除联系人成功' +
                                  '*' * 20 + '\n')
 def setup_class(cls):
     cls.mailpage = MainPage().to_sendmailpage()
     cls.mailpage.logger.info('\n\n' + '*' * 20 + '测试发送邮件失败' + '*' * 20 +
                              '\n')
Esempio n. 8
0
 def app_home(cls):
     cls.get_client().restart_app()
     return MainPage()
Esempio n. 9
0
 def _click_send_email(self):
     from page.mainpage import MainPage
     self._find(self._send_locator).click()
     return MainPage()
Esempio n. 10
0
 def goto_main(self):
     '''进入首页'''
     return MainPage(self.driver)
Esempio n. 11
0
 def setup_class(cls):
     cls.login_page = MainPage().login_no_cookie()
     cls.login_page.logger.info('\n\n' + '*' * 20 + '测试用户登录成功' + '*' * 20 +
                                '\n')
Esempio n. 12
0
 def to_mainpage(self):
     from page.mainpage import MainPage
     return MainPage()
Esempio n. 13
0
 def setup(self):
     self.mainpage = MainPage()