def test_changing_email(self): m.change_email_address().click() m.new_email_text_box().send_keys(account_new_email) m.change_password_ok_button().click() #Reset email address m.change_email_address().click() try: if WebDriver.WebDriverWait(driver, 1).until( tbc((By.NAME, account_new_email))): log("Email adress changed") except Exception: log("Email adress is not changed", "Error") m.new_email_text_box().send_keys(account_email) m.change_password_ok_button().click() log("Email address reset")
from time import sleep from elements.drivers import WebDriver, LoginWith, Home, log, More from appium.webdriver.common.touch_action import TouchAction as ta ############################################# account_name = "existingTest01" account_pw = "password" account_email = "*****@*****.**" text_message = "cyber dust" ############################################# h = Home() m = More() driver = WebDriver().driver() sw = driver.get_window_size()['width'] sh = driver.get_window_size()['height'] class MessagePinning_test: def test_pinning_messages(self): # Logs into existing testing account LoginWith().user(account_name, account_pw, driver) log("Logged In") h.action_menu().click() h.action_menu_dust().click() sleep(5) #m.chat_room_first_friend().click() h.chat_room_text_box().click() h.chat_room_text_box().send_keys(text_message) h.chat_room_send_button().click() log("Sent a dust")
############################### account01 = "blasttest01" password01 = account01 account02 = "blasttest02" password02 = account02 account03 = "blasttest03" password03 = account03 blast_url = "www.cyberdust.com" blast_username = "******" + account01 ################################ h = Home() driver = WebDriver().driver() sw = driver.get_window_size()['width'] sh = driver.get_window_size()['height'] # Logs into blast testing account LoginWith().user(account01, password01, driver) class BlastTest: def test_sending_text_blasts(self): # Creates a blast list h.blast_lists().click(), sleep(2) log("Creating a blast list") try: if driver.find_element_by_id( "com.radicalapps.cyberdust:id/blast_groups_list_item_group_indicator"
from elements.drivers import WebDriver, LoginWith, Home, log, More, SignUp from selenium.webdriver.common.by import By from appium.webdriver.common.touch_action import TouchAction as ta from selenium.webdriver.support import expected_conditions as ec ############################################## account_name = "existing02" account_pw = "password" account_new_pw = "new password" account_email = "*****@*****.**" account_new_email = "*****@*****.**" ############################################## h = Home() m = More() s = SignUp() driver = WebDriver().driver() tbc = ec.element_to_be_clickable class Account_Management_test: def test_changing_password(self): # Logs into existing testing account LoginWith().user(account_name, account_pw, driver) log("Logged In") #Changes passwrord m.more_button().click() driver.scroll(m.friends(), m.back_button()) m.change_password().click() m.enter_old_password().click() m.enter_old_password().send_keys(account_pw)
############################### account01 = "blasttest01" password01 = account01 account02 = "blasttest02" password02 = account02 account03 = "blasttest03" password03 = account03 blast_url = "www.cyberdust.com" blast_username = "******" + account01 ################################ h = Home() driver = WebDriver().driver() sw = driver.get_window_size()["width"] sh = driver.get_window_size()["height"] # Logs into blast testing account LoginWith().user(account01, password01, driver) class BlastTest: def test_sending_text_blasts(self): # Creates a blast list h.blast_lists().click(), sleep(2) log("Creating a blast list") try: if driver.find_element_by_id("com.radicalapps.cyberdust:id/blast_groups_list_item_group_indicator"): h.blast_list_expand() # Doesn't need .click() attribute