當前位置: 首頁>>代碼示例>>Python>>正文


Python InitCase.task_options方法代碼示例

本文整理匯總了Python中Utils.InitCase.task_options方法的典型用法代碼示例。如果您正苦於以下問題:Python InitCase.task_options方法的具體用法?Python InitCase.task_options怎麽用?Python InitCase.task_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Utils.InitCase的用法示例。


在下文中一共展示了InitCase.task_options方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test

# 需要導入模塊: from Utils import InitCase [as 別名]
# 或者: from Utils.InitCase import task_options [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

示例2: test

# 需要導入模塊: from Utils import InitCase [as 別名]
# 或者: from Utils.InitCase import task_options [as 別名]
    def test(self):
        InitCase.init_case(menu="ALL", taskOption="note")
        self.verificationErrors = []
        noteText = "test test test test test test test test test test test test test test test test test test test test test test "
        Config.find_element(Config.note).send_keys(noteText)

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

        Config.find_element(Config.task_closeButton).click()
        InitCase.task_options("note")

        try: self.assertEqual(noteText, Config.find_element(Config.note).text)
        except AssertionError as e: self.verificationErrors.append(str(e))
開發者ID:eidan76,項目名稱:Web-Automation1,代碼行數:16,代碼來源:AddNote.py

示例3: test

# 需要導入模塊: from Utils import InitCase [as 別名]
# 或者: from Utils.InitCase import task_options [as 別名]
    def test(self):
        InitCase.init_case(taskOption="note")
        self.verificationErrors = []
        noteText = "edit edit edit edit"
        Config.find_element(Config.note).clear()
        Config.find_element(Config.note).send_keys(noteText)

        try: self.assertEqual(" ", Config.find_element(Config.task_badgeByIconName, "note").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)
        InitCase.task_options("note")

        time.sleep(1)
        try: self.assertEqual(noteText, Config.find_element(Config.note).text)
        except AssertionError as e: self.verificationErrors.append(str(e))
開發者ID:eidan76,項目名稱:Web-Automation1,代碼行數:19,代碼來源:EditNote.py

示例4: test

# 需要導入模塊: from Utils import InitCase [as 別名]
# 或者: from Utils.InitCase import task_options [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


注:本文中的Utils.InitCase.task_options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。