本文整理匯總了Python中Utils.Config.set_sender方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.set_sender方法的具體用法?Python Config.set_sender怎麽用?Python Config.set_sender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Utils.Config
的用法示例。
在下文中一共展示了Config.set_sender方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test
# 需要導入模塊: from Utils import Config [as 別名]
# 或者: from Utils.Config import set_sender [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)
示例2: test
# 需要導入模塊: from Utils import Config [as 別名]
# 或者: from Utils.Config import set_sender [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)