示例#1
0
    def setUp(self):

        logger.info("测试前准备.")
        self.driver = browser(glo.GLO_BROWSER_TYPE)

        PMCloudIndexActions(self.driver).openPMCloudIndex()
        PMCloudIndexActions(self.driver).clickLoginButton()
        PMCloudLoginActions(self.driver).pmcloudLogin(remember_selected=True)
示例#2
0
    def setUp(self):

        logger.info("测试前准备.")
        self.__driver = browser(glo.GLO_BROWSER_TYPE)

        PMCloudIndexActions(self.__driver).openPMCloudIndex()
        PMCloudIndexActions(self.__driver).clickLoginButton()
        PMCloudLoginActions(self.__driver).pmcloudLogin()
        ApptenantActions(self.__driver).apptenantLogin()
        WorkbenchActions(self.__driver).clickProject()
        WorkbenchActions(self.__driver).switchToIframe()
示例#3
0
    def setUp(self):

        logger.info("测试前准备.")
        self.__driver = browser(glo.GLO_BROWSER_TYPE)

        PMCloudIndexActions(self.__driver).openPMCloudIndex()
        PMCloudIndexActions(self.__driver).clickLoginButton()
        PMCloudLoginActions(self.__driver).pmcloudLogin()
        ApptenantActions(self.__driver).apptenantLogin()
        WorkbenchActions(self.__driver).clickProject()
        WorkbenchActions(self.__driver).switchToIframe()
        ProjectActions(self.__driver).saveCreateProject()
        ProjectActions(self.__driver).closeListToast()
        ProjectActions(self.__driver).selectFirstProject()
        ProjectActions(self.__driver).clickEnterpriseButton()
    def setUp(self):

        logger.info("测试前准备.")
        self.__driver = browser(glo.GLO_BROWSER_TYPE)
        PMCloudIndexActions(self.__driver).login()
        PMCloudLoginActions(self.__driver).pmcloudLogin()
        ApptenantActions(self.__driver).apptenantLogin()
        WorkbenchActions(self.__driver).clickContactType()
        self.contacttype_page = ContactTypeActions(self.__driver)
示例#5
0
    def setUpClass(cls):
        logger.info("测试前准备.")
        cls.__driver = browser(glo.GLO_BROWSER_TYPE)
        PMCloudIndexActions(cls.__driver).login()
        PMCloudLoginActions(cls.__driver).pmcloudLogin()
        ApptenantActions(cls.__driver).apptenantLogin()
        WorkbenchActions(cls.__driver).clickContactType()

        # 提前新建好联系类型
        cls.contacttype_page = ContactTypeActions(cls.__driver)
        cls.contacttype_page.clickAddContactTypeCancelButton()
        cls.contacttype_page.saveAddContactType()
        cls.contacttype_page.clickAddContactTypeCancelButton()
示例#6
0
    def test_login_success(self):
        """登录成功"""

        logger.info("执行TestLogin_test_login_success测试用例.")
        expected_result = "孙旭冉"

        index_page = PMCloudIndexActions(self.__driver)
        index_page.openPMCloudIndex()
        index_page.clickLoginButton()

        login_page = PMCloudLoginActions(self.__driver)
        login_page.pmcloudLogin()

        apptenant_page = ApptenantActions(self.__driver)
        apptenant_page.apptenantLogin()

        self.workbench_page = WorkbenchActions(self.__driver)
        result = self.workbench_page.getCurrentUser()

        self.assertEqual(expected_result,
                         result,
                         msg="测试不通过,期望结果为:{expect}, 实际结果为:{result}.".format(
                             expect=expected_result, result=result))