当前位置: 首页>>代码示例>>Python>>正文


Python Config.sync方法代码示例

本文整理汇总了Python中Utils.Config.sync方法的典型用法代码示例。如果您正苦于以下问题:Python Config.sync方法的具体用法?Python Config.sync怎么用?Python Config.sync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils.Config的用法示例。


在下文中一共展示了Config.sync方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        InitCase.init_case(menu="ALL", taskNo=0)
        self.verificationErrors = []
        Config.find_element(Config.openSettings).click()

        Config.wait_for_element(Config.settings_CompletedTasks)
        Config.find_element(Config.settings_CompletedTasks).click()

        Config.wait_for_element(Config.completedTask)
        Config.find_element(Config.completedTasks_Restore).click()
        for i in range(5):
            try:
                if "No Completed tasks yet" == Config.find_element(Config.completedTasks_BackgroundText).text: break
            except: pass
            time.sleep(1)
        else: self.fail("time out")

        Config.find_element(Config.overlay).click()
        Config.sync()
        Config.wait_for_element(Config.taskTitle)

        try: self.assertEqual("edited", Config.find_element(Config.taskTitle).text)
        except AssertionError as e: self.verificationErrors.append(str(e))

        try: self.assertEqual("unchecked", Config.find_element(Config.task).get_attribute("data-status"))
        except AssertionError as e: self.verificationErrors.append(str(e))

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:30,代码来源:RestoreFromDoneList.py

示例2: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []

        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        self.user = Config.find_element(Config.settings_email).text

        listID = Config.find_element(Config.main_listByName, "Shared").get_attribute("id")
        InitCase.init_case(menu=listID, taskNo=1)
        CreateLoadedTask.create_loaded_task()

        Config.sync()
        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()

        InitCase.init_case(menu="ALL", taskOption="subtasks")
        try: self.assertEqual("subtask",  Config.find_element(Config.subtasks_title).text)
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.task_options("note")
        try: self.assertTrue(len(Config.find_element(Config.note).text) != 0)
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.task_options("files")
        try: self.assertEqual("2015-03-29.png", Config.find_element(Config.files_name).text)
        except AssertionError as e: self.verificationErrors.append(str(e))

        try: self.assertTrue(Config.is_element_present(Config.files_thumbnailByType, "image"))
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.close_task()
        try: self.assertTrue(Config.is_element_present(Config.taskPriority))
        except AssertionError as e: self.verificationErrors.append(str(e))

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:37,代码来源:AddTaskToSharedList.py

示例3: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []

        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        self.user = Config.find_element(Config.settings_email).text

        InitCase.init_case(menu="ALL", view="date", taskOption="share")

        Config.find_element(Config.sharing_commentInput).clear()
        Config.find_element(Config.sharing_commentInput).send_keys("comment test")
        Config.find_element(Config.sharing_addCommentButton).click()

        Config.sync()
        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()
        InitCase.init_case(menu="ALL", taskOption="share")

        try: self.assertEqual(Config.find_element(Config.sharing_commentAuthor).text + "@any.do", self.other_user())
        except AssertionError as e: self.verificationErrors.append(e)

        try: self.assertEqual(Config.find_element(Config.sharing_commentText).text, "comment test")
        except AssertionError as e: self.verificationErrors.append(e)

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:27,代码来源:Comment.py

示例4: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []

        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        user = Config.find_element(Config.settings_email).text

        InitCase.init_case(menu="ALL", view="date")

        sender = Config.get_sender()
        receiver = Config.get_receiver()

        sections = ["Tomorrow", "Upcoming", "Someday"]
        for i in range(3):
            sec = random.choice(sections)
            ActionChains(Config.get_driver()).drag_and_drop(Config.find_element(Config.task), Config.find_element(Config.list_sectionByName, sec)).perform()
            sections.remove(sec)
            Config.sync()

            if user == receiver: user = sender
            else: user = receiver
            ChangeUser.change_user(user)

            InitCase.init_case(menu="ALL", view="date")
            try: self.assertTrue(Config.is_element_present(Config.taskBySectionName, sec))
            except AssertionError as e: self.verificationErrors.append(str(e))

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:30,代码来源:DragBetweenSections.py

示例5: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        self.user = Config.find_element(Config.settings_email).text

        listID = Config.find_element(Config.main_listByName, "PERSONAL ERRANDS").get_attribute("id")
        SharedListID = Config.find_element(Config.main_listByName, "Shared").get_attribute("id")
        InitCase.init_case(menu=listID, taskNo=1, taskOption="open")
        self.verificationErrors = []

        Config.find_element(Config.task_FolderSelector).click()
        Config.find_element(Config.task_ListSelectorItemByID, SharedListID).click()
        Config.find_element(Config.confirmDialog_OK).click()

        Config.find_element(Config.task_closeButton).click()
        Config.sync()

        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()

        Config.find_element(Config.main_listByName, "Shared").click()

        try: self.assertTrue(Config.is_element_present(Config.task))
        except AssertionError as e: self.verificationErrors.append(str(e))

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:28,代码来源:ChangeToSharedList.py

示例6: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []

        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        self.user = Config.find_element(Config.settings_email).text

        InitCase.init_case(menu="ALL", taskNo=0)
        InitCase.init_case(menu="ALL", view="date", taskOption="share")
        Config.find_element(Config.sharing_inputEmail).clear()
        Config.find_element(Config.sharing_inputEmail).send_keys(self.other_user())
        Config.wait_for_element(Config.sharing_inputEmailDone)
        time.sleep(1)
        Config.find_element(Config.sharing_commitEmailButton).click()
        Config.wait_for_element(Config.sharing_sendInvites)
        Config.find_element(Config.sharing_sendInvites).click()
        Config.wait_for_element(Config.sharing_inviteOverlay, present=False)

        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()

        Config.wait_for_element(Config.sharingInvitation)

        try: self.assertEqual(Config.find_element(Config.sharingInvitation_title).text, "SHARED TASK")
        except AssertionError as e: self.verificationErrors.append(str(e))

        Config.find_element(Config.sharingInvitation_decline).click()
        Config.sync()
        InitCase.select_menu("ALL")

        try: self.assertFalse(Config.find_element(Config.taskShare).is_displayed())
        except AssertionError as e: self.verificationErrors.append(str(e))

        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()

        InitCase.init_case(menu="ALL", taskOption="share")

        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, self.other_user()).get_attribute("data-status"), "REJECTED")
        except AssertionError as e: self.verificationErrors.append(e)

        Config.find_element(Config.sharing_memberBadgeByEmail, self.other_user()).click()
        ActionChains(Config.get_driver()).move_to_element(Config.find_element(Config.sharing_memberPopup)).perform()

        try: self.assertEqual(Config.find_element(Config.sharing_badgeStatus).text, "Rejected Invitation")
        except AssertionError as e: self.verificationErrors.append(e)

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:50,代码来源:Decline.py

示例7: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        self.user = Config.find_element(Config.settings_email).text

        listID = Config.find_element(Config.main_listByName, "Shared").get_attribute("id")
        InitCase.init_case(menu=listID)
        self.verificationErrors = []

        Config.find_element(Config.taskCheck).click()
        time.sleep(1)
        try: self.assertEqual("checked", Config.find_element(Config.task).get_attribute("data-status"))
        except AssertionError as e: self.verificationErrors.append(str(e))
        Config.sync()

        ChangeUser.change_user(self.other_user())
        self.user = self.other_user()

        Config.find_element(Config.main_listByName, "Shared").click()
        try: self.assertEqual(Config.find_element(Config.task).get_attribute("data-status"), "checked")
        except AssertionError as e: self.verificationErrors.append(str(e))

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:25,代码来源:CompleteTask.py

示例8: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []

        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        user = Config.find_element(Config.settings_email).text

        sender = Config.get_sender()
        receiver = Config.get_receiver()

        InitCase.init_case(menu="ALL")
        CreateLoadedTask.create_loaded_task()
        Config.sync()

        if user == receiver: user = sender
        else: user = receiver
        ChangeUser.change_user(user)

        InitCase.init_case(menu="ALL", taskOption="subtasks")
        try: self.assertEqual("subtask",  Config.find_element(Config.subtasks_title).text)
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.task_options("note")
        try: self.assertTrue(len(Config.find_element(Config.note).text) != 0)
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.task_options("files")
        try: self.assertEqual("2015-03-29.png", Config.find_element(Config.files_name).text)
        except AssertionError as e: self.verificationErrors.append(str(e))

        try: self.assertTrue(Config.is_element_present(Config.files_thumbnailByType, "image"))
        except AssertionError as e: self.verificationErrors.append(str(e))

        InitCase.close_task()
        try: self.assertTrue(Config.is_element_present(Config.taskPriority))
        except AssertionError as e: self.verificationErrors.append(str(e))
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:38,代码来源:EditSharedTask.py

示例9: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []
        ChangeUser.change_to_premium()
        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        Config.set_sender(Config.find_element(Config.settings_email).text)
        sender = Config.get_sender()
        Config.set_receiver(ChangeUser.change_user())
        receiver = Config.get_receiver()
        ChangeUser.change_user(sender)

        InitCase.init_case(menu="MAIN")
        while Config.is_element_present(Config.main_listByName, "Shared"):
            xl = DeleteFromOptions.DeleteFromOptions("test")
            xl.test(Config.find_element(Config.main_listByName, "Shared").get_attribute("id"))

        Config.find_element(Config.main_newList).click()
        Config.find_element(Config.listTitleEdit).send_keys("Shared")
        Config.find_element(Config.listTitleEdit).send_keys(Keys.ENTER)

        listID = Config.find_element(Config.main_listByName, "Shared").get_attribute("id")
        Config.find_element(Config.main_listByName, "Shared").click()

        Config.find_element(Config.list_addSharedMemberButton).click()
        Config.find_element(Config.sharing_inputEmail).clear()
        Config.find_element(Config.sharing_inputEmail).send_keys(receiver)
        Config.wait_for_element(Config.sharing_commitEmailButton)
        time.sleep(1)
        Config.find_element(Config.sharing_commitEmailButton).click()
        Config.wait_for_element(Config.sharing_sendInvites)
        Config.find_element(Config.sharing_sendInvites).click()
        Config.wait_for_element(Config.sharing_sendInvites, present=False)

        time.sleep(1)
        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, receiver).get_attribute("data-status"), "PENDING")
        except AssertionError as e: self.verificationErrors.append(e)

        Config.find_element(Config.sharing_memberBadgeByEmail, receiver).click()
        ActionChains(Config.get_driver()).move_to_element(Config.find_element(Config.sharing_memberPopup)).perform()
        time.sleep(1)
        try: self.assertEqual(Config.find_element(Config.sharing_badgeStatus).text, "Invitation sent (Pending)")
        except AssertionError as e:self.verificationErrors.append(e)

        try: self.assertEqual(Config.find_element(Config.sharing_badgeEmail).text, receiver.upper())
        except AssertionError as e: self.verificationErrors.append(e)

        Config.find_element(Config.task_closeButton).click()
        Config.wait_for_element(Config.task_closeButton, present=False)

        try: self.assertEqual(Config.find_element(Config.list_sharedMemberByEmail, receiver).get_attribute("data-status"), "PENDING")
        except AssertionError as e: self.verificationErrors.append(e)

        Config.find_element(Config.goToMainGrid).click()
        try: self.assertEqual(Config.find_element(Config.main_sharedListMembersByListID, listID).get_attribute("data-status"), "PENDING")
        except AssertionError as e: self.verificationErrors.append(e)

        ChangeUser.change_user(receiver)

        Config.wait_for_element(Config.sharingInvitation)

        try: self.assertEqual(Config.find_element(Config.sharingInvitation_title).text, "SHARED LIST")
        except AssertionError as e: self.verificationErrors.append(str(e))

        Config.find_element(Config.sharingInvitation_accept).click()
        Config.sync()
        InitCase.init_case(menu="MAIN")

        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, sender).get_attribute("data-status"), "CREATOR")
        except AssertionError as e: self.verificationErrors.append(e)

        ChangeUser.change_user(sender)
        InitCase.init_case(menu="MAIN")

        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, receiver).get_attribute("data-status"), "ACCEPTED")
        except AssertionError as e: self.verificationErrors.append(e)

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:79,代码来源:CreateSharedList.py

示例10: test

# 需要导入模块: from Utils import Config [as 别名]
# 或者: from Utils.Config import sync [as 别名]
    def test(self):
        self.verificationErrors = []
        Config.find_element(Config.openSettings).click()
        time.sleep(1)
        Config.set_sender(Config.find_element(Config.settings_email).text)
        sender = Config.get_sender()
        Config.set_receiver(ChangeUser.change_user())
        receiver = Config.get_receiver()
        ChangeUser.change_user(sender)

        InitCase.init_case(menu="ALL", view="date", taskOption="share")
        Config.find_element(Config.sharing_inputEmail).clear()
        Config.find_element(Config.sharing_inputEmail).send_keys(receiver)
        Config.wait_for_element(Config.sharing_inputEmailDone)
        time.sleep(1)
        Config.find_element(Config.sharing_commitEmailButton).click()
        Config.wait_for_element(Config.sharing_sendInvites)
        Config.find_element(Config.sharing_sendInvites).click()
        Config.wait_for_element(Config.sharing_inviteOverlay, present=False)

        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, receiver).get_attribute("data-status"), "PENDING")
        except AssertionError as e: self.verificationErrors.append(e)

        Config.find_element(Config.sharing_memberBadgeByEmail, receiver).click()
        ActionChains(Config.get_driver()).move_to_element(Config.find_element(Config.sharing_memberPopup)).perform()

        try: self.assertEqual(Config.find_element(Config.sharing_badgeStatus).text, "Invitation sent (Pending)")
        except AssertionError as e:self.verificationErrors.append(e)

        try: self.assertEqual(Config.find_element(Config.sharing_badgeEmail).text, receiver.upper())
        except AssertionError as e: self.verificationErrors.append(e)

        try: self.assertEqual("1", Config.find_element(Config.task_badgeByIconName, "share").get_attribute("data-badge"))
        except AssertionError as e: self.verificationErrors.append(str(e))

        Config.find_element(Config.task_closeButton).click()
        Config.wait_for_element(Config.task_closeButton, present=False)

        try: self.assertTrue(Config.is_element_present(Config.taskSharedAssignee))
        except AssertionError as e: self.verificationErrors.append(str(e))

        ChangeUser.change_user(receiver)

        Config.wait_for_element(Config.sharingInvitation)

        try: self.assertEqual(Config.find_element(Config.sharingInvitation_title).text, "SHARED TASK")
        except AssertionError as e: self.verificationErrors.append(str(e))

        Config.find_element(Config.sharingInvitation_accept).click()
        Config.sync()
        InitCase.init_case(menu="ALL", view="date")

        try: self.assertTrue(Config.find_element(Config.taskShare).is_displayed())
        except AssertionError as e: self.verificationErrors.append(str(e))

        ChangeUser.change_user(sender)
        InitCase.init_case(menu="ALL", taskOption="share")

        try: self.assertEqual(Config.find_element(Config.sharing_memberBadgeByEmail, receiver).get_attribute("data-status"), "ACCEPTED")
        except AssertionError as e: self.verificationErrors.append(e)

        self.assertEqual([], self.verificationErrors)
开发者ID:eidan76,项目名称:Web-Automation1,代码行数:64,代码来源:CreateSharedTask.py


注:本文中的Utils.Config.sync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。