示例#1
0
 def delete_mail_by_checkbox_by_subject(self, subject):
     self.open_email_by_subject(subject)
     self.open_email_menu()
     helper.click(self.delete_mail_menu_item)
     helper.wait_for_element_present(self.delete_btn)
     helper.click(self.delete_btn)
     helper.wait_for_element_not_visible('//span[contains(., "%s")]' % subject)
示例#2
0
 def delete_mail_by_checkbox_by_subject(self, subject):
     self.open_email_by_subject(subject)
     self.open_email_menu()
     helper.click(self.delete_mail_menu_item)
     helper.wait_for_element_present(self.delete_btn)
     helper.click(self.delete_btn)
     helper.wait_for_element_not_visible('//span[contains(., "%s")]' %
                                         subject)
示例#3
0
 def login(self, username, password):
     if not helper.is_element_present(self.username):
         self.choose_another_account()
     if not helper.is_element_visible(
             '//span[@id="reauthEmail" and contains(., "%s")]' % username):
         helper.type(loc=self.username, text=username)
         helper.click(self.next_btn)
     helper.wait_for_element_visible(self.password)
     helper.type(loc=self.password, text=password)
     helper.click(self.sign_in_btn)
     return WelcomePage.WelcomePage()
示例#4
0
 def send_mail_with_big_attach(self, address, subject=None):
     self.type_address(address)
     if subject is not None:
         self.type_subject(subject)
     self.press_attach_file()
     command = str(sys.path[0] + '\\test\\data\\file_uploader.exe %s' % str(sys.path[0] + '\\test\\data\\test_data'))
     try:
         subprocess.check_output(command)
     except:
         return
     helper.wait_for_element_visible(self.alert_cancel)
     helper.click(self.alert_cancel)
     helper.wait_for_element_not_visible(self.alert_cancel)
示例#5
0
 def send_mail_with_big_attach(self, address, subject=None):
     self.type_address(address)
     if subject is not None:
         self.type_subject(subject)
     self.press_attach_file()
     command = str(sys.path[0] + '\\test\\data\\file_uploader.exe %s' %
                   str(sys.path[0] + '\\test\\data\\test_data'))
     try:
         subprocess.check_output(command)
     except:
         return
     helper.wait_for_element_visible(self.alert_cancel)
     helper.click(self.alert_cancel)
     helper.wait_for_element_not_visible(self.alert_cancel)
示例#6
0
 def logout(self):
     helper.click(self.userpic_btn)
     helper.wait_for_element_visible(self.logout_btn)
     helper.click(self.logout_btn)
     helper.get_alert()
     helper.wait_for_element_visible(self.account_choser_link)
     helper.click(self.account_choser_link)
     helper.wait_for_element_visible(self.another_account_btn)
     helper.click(self.another_account_btn)
     helper.wait_for_element_visible(self.username)
示例#7
0
 def add_forwarding_mail(self, email):
     helper.wait_for_element_visible(self.add_forwarding_address)
     helper.click(self.add_forwarding_address)
     helper.wait_for_element_visible(self.new_forwarding_address_input)
     helper.type(self.new_forwarding_address_input, email)
     helper.click(self.new_forwarding_address_confirm)
     helper.wait_for_element_not_visible(self.new_forwarding_address_dialog)
     helper.select_window(1)
     helper.click(self.submit_new_address)
     helper.select_window(0)
     helper.click('//button[@name="ok"]')
示例#8
0
 def press_attach_file(self):
     helper.click(self.attach_file)
示例#9
0
 def choose_emoticons(self, count):
     self.open_emoticons_menu()
     for i in range(count):
         helper.click(self.emoticon)
     assert len(helper.find_elements(self.emodji_in_mail_text)) == count
示例#10
0
 def press_attach_file(self):
     helper.click(self.attach_file)
示例#11
0
 def open_send_mail_page(self):
     helper.click(self.write_mail_btn)
     return WriteMailPage.WriteMailPage()
示例#12
0
 def open_email_menu(self):
     helper.click(self.email_menu)
     helper.wait_for_element_visible(self.delete_mail_menu_item)
示例#13
0
 def open_email_by_subject(self, subject):
     loc = '//span[contains(., "%s")]' % subject
     helper.wait_for_element_visible(loc)
     helper.click(loc)
     helper.wait_for_element_visible('//h2[contains(., "%s")]' % subject)
     print "Here!!!"
示例#14
0
 def open_email_menu(self):
     helper.click(self.email_menu)
     helper.wait_for_element_visible(self.delete_mail_menu_item)
示例#15
0
 def choose_emoticons(self, count):
     self.open_emoticons_menu()
     for i in range(count):
         helper.click(self.emoticon)
     assert len(helper.find_elements(self.emodji_in_mail_text)) == count
示例#16
0
 def open_pop_imap_settings(self):
     helper.wait_for_element_visible(self.settings_pop_imap)
     helper.click(self.settings_pop_imap)
示例#17
0
 def open_incoming_mail(self):
     helper.click(self.incoming_mail_btn)
     return MailboxPage.MailboxPage()
示例#18
0
 def choose_another_account(self):
     helper.wait_for_element_visible(self.account_choser_link)
     helper.click(self.account_choser_link)
     helper.wait_for_element_visible(self.another_account_btn)
     helper.click(self.another_account_btn)
     helper.wait_for_element_visible(self.username)
示例#19
0
 def open_email_by_subject(self, subject):
     loc = '//span[contains(., "%s")]' % subject
     helper.wait_for_element_visible(loc)
     helper.click(loc)
     helper.wait_for_element_visible('//h2[contains(., "%s")]' % subject)
     print "Here!!!"