def test_sending_photo_blast_01(self): # Sends photo blast with drawing and URL to all followers log("Sending photo blast with drawing and text to all followers") h.action_menu().click() h.action_menu_media().click() h.photo_button().click() h.photo_pen().click() driver.swipe( h.photo_back_button().location["x"] + 50, h.photo_back_button().location["y"] - 50, h.photo_pen().location["x"], h.photo_pen().location["y"] + 50, ) h.photo_color().click() driver.swipe( h.next_button().location["x"] + 100, h.next_button().location["y"] - 50, h.photo_location_button().location["x"] + 50, h.photo_location_button().location["y"] + 50, ) h.add_text().click() h.add_text_field().send_keys(blast_url) h.done_button().click() h.next_button().click() h.blast_all_followers().click() h.blast_Ok_button().click()
def test_updating_profile_picture(self): # Changes profile picture m.more_button().click() m.profile_picture().click() m.change_profile_picture().click() log("Changing profile picture") s.camera_button().click(), sleep(3) driver.press_keycode(25), driver.press_keycode(27), sleep(5) # Takes picture using Android keycode try: driver.find_element_by_id("com.motorola.camera:id/review_approve").click() # For Moto phones except Exception: pass try: driver.find_element_by_id("com.android.camera:id/select_this").click() # For older HTC one phones except Exception: pass try: ta(driver).press(x=1660, y=530).release().perform() # For new HTC One phones except Exception: pass try: driver.find_element_by_name("OK").click() # For Galaxy phones except Exception: pass try: driver.find_element_by_id("com.android.camera2:id/done_button").click() # For Nexus phones except Exception: pass m.profile_picture_done().click(), sleep(3) log("Profile picture updated")
def test_updating_profile_picture(self): # Changes profile picture m.more_button().click() m.profile_picture().click() m.change_profile_picture().click() log("Changing profile picture") s.camera_button().click(), sleep(3) driver.press_keycode(25), driver.press_keycode(27), sleep( 5) # Takes picture using Android keycode try: driver.find_element_by_id("com.motorola.camera:id/review_approve" ).click() # For Moto phones except Exception: pass try: driver.find_element_by_id("com.android.camera:id/select_this" ).click() # For older HTC one phones except Exception: pass try: ta(driver).press( x=1660, y=530).release().perform() # For new HTC One phones except Exception: pass try: driver.find_element_by_name("OK").click() # For Galaxy phones except Exception: pass try: driver.find_element_by_id("com.android.camera2:id/done_button" ).click() # For Nexus phones except Exception: pass m.profile_picture_done().click(), sleep(3) log("Profile picture updated")
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) m.enter_new_password().click() m.enter_new_password().send_keys(account_new_pw) m.confirm_new_password().click() m.confirm_new_password().send_keys(account_new_pw) m.change_password_ok_button().click() #Resets Password m.change_password().click() m.enter_old_password().send_keys(account_new_pw) m.enter_new_password().click() m.enter_new_password().send_keys(account_pw) m.confirm_new_password().click() m.confirm_new_password().send_keys(account_pw) m.change_password_ok_button().click() log("Password reset")
def test_account_deleting(self): log("Deleting") sleep(2) m.more_button().click() driver.scroll(m.friends(), m.back_button()) m.delete_account().click() m.confirm().click() log("Account Deleted") try: if LoginWith().user(account_name, account_pw, driver): ("Logged into deleted account") except Exception: log("Can not login into deleted account") #Recreating the account s.pick_username().send_keys(account_name) s.sign_up_OK(5).click() s.create_password().send_keys(account_pw) s.confirm_password().send_keys(account_pw) s.password_OK().click() s.birthday().click(), sleep(2) log("Entering birthday") ta(driver).long_press(x=s.date().location['x'], y=s.date().location['y'], duration=3000).release().perform() s.birthday_done().click() s.birthday_OK().click() log("Entering email") s.email().send_keys(account_email) s.email_OK().click() s.OK_button().click()
def test_dust_from_dustRoom(self): # Logs into existing testing account LoginWith().user(account_name, account_pw, driver) log("Logged In") #Changes passwrord h.action_menu().click() h.action_menu_dust().click() h.action_menu()
def test_sending_giphy_blast(self): # Sends text blast with giphy to a single friend log("Sending giphy") h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys(":giphy cats") h.OK_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def send_giphy_no_loc(self): log("Sending giphy without location") for i in range(3): h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys(":giphy cats") h.OK_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def send_photo_no_loc(self): log("Sending photo blasts without location") for i in range(3): h.action_menu().click() h.action_menu_media().click() h.photo_button().click() h.next_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def send_video_no_loc(self): log("Sending video blasts without location") for i in range(3): h.action_menu().click() h.action_menu_media().click() h.video_button().click() ta(driver).long_press(h.photo_button(), duration=5000).release().perform() h.next_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def send_text_no_loc(self): log("Sending text blasts without location") my_text = {0: "all followers", 1: "blast list", 2: "friend"} for i in range(3): h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys(my_text[i]) h.OK_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def test_opening_giphy_blast(self): # Checks if giphy was received try: sleep(3) if driver.find_element_by_id("com.radicalapps.cyberdust:id/page_frag_gif_view")and\ driver.find_element_by_id("com.radicalapps.cyberdust:id/text_overlay"): log("Giphy loaded successfully") except Exception: log("Giphy was not found", "Warning") sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
def test_opening_photo_blast(self): # Opens photo with drawing and URL try: sleep(3) if driver.find_element_by_id("com.radicalapps.cyberdust:id/page_frag_image"): log("Image loaded successfully") except Exception: log("Image did not load", "Warning") h.swipe_view_text().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300)
def test_opening_non_public_blast(self): # Opens non public photo blast with +username try: sleep(4) if driver.find_element_by_id("com.radicalapps.cyberdust:id/page_frag_reblast"): log("Able to reblast non public blast", "Warning") except Exception: log("Not able to reblast non public blast") h.swipe_view_text().click() h.swipe_view_add().click(), sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300)
def test_opening_giphy_blast(self): # Checks if giphy was received try: sleep(3) if driver.find_element_by_id( "com.radicalapps.cyberdust:id/page_frag_gif_view" ) and driver.find_element_by_id("com.radicalapps.cyberdust:id/text_overlay"): log("Giphy loaded successfully") except Exception: log("Giphy was not found", "Warning") sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300)
def check_if_logged_out(self): try: s.sign_up_button(5) logged_out = True except Exception: logged_out = False if logged_out is False: m.more_button().click(), sleep(1) driver.scroll(m.followers(), m.back_button()) m.logout().click() log("Logging out before starting test") m.confirm().click()
def test_opening_non_public_blast(self): # Opens non public photo blast with +username try: sleep(4) if driver.find_element_by_id( "com.radicalapps.cyberdust:id/page_frag_reblast"): log("Able to reblast non public blast", "Warning") except Exception: log("Not able to reblast non public blast") h.swipe_view_text().click() h.swipe_view_add().click(), sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
def test_opening_photo_blast(self): # Opens photo with drawing and URL try: sleep(3) if driver.find_element_by_id( "com.radicalapps.cyberdust:id/page_frag_image"): log("Image loaded successfully") except Exception: log("Image did not load", "Warning") h.swipe_view_text().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
def test_opening_text_blast(self): # Login as account02 LoginWith().user(account02, password02, driver) # Opens text blast with +username, URL, and location log("Opening text blast and checking +username, URL, and location") h.name(account01).click(), sleep(2) h.swipe_view_location().click(), sleep(3), driver.press_keycode(4), sleep(2) ta(driver).press(x=sw * 0.17, y=sh * 0.23).release().perform() # clicks +username h.swipe_view_add().click(), sleep(2) h.swipe_view_url_card().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300)
def test_sign_up(self): # Creates a new account and tests if special characters can be used s.sign_up_button().click() s.pick_username().send_keys(account_name + "!@#$") try: s.sign_up_OK(5).click() log("Special characters used in username", "Warning") except Exception: log("Could not use special characters in username") s.pick_username().send_keys(account_name) s.sign_up_OK(5).click() s.create_password().send_keys(account_pw) s.confirm_password().send_keys(account_pw) s.password_OK().click() s.birthday().click(), sleep(2) # Sets birthday log("Entering birthday") ta(driver).long_press(x=s.date().location['x'], y=s.date().location['y'], duration=3000).release().perform() s.birthday_done().click() s.birthday_OK().click() # Enters email log("Entering email") s.email().send_keys(account_email) s.email_OK().click() s.OK_button().click()
def test_sending_video_blast_02(self): # Takes video, adds URL, then sends to single friend log("Sending video with URL") h.action_menu().click() h.action_menu_media().click() h.video_button().click() ta(driver).long_press(h.photo_button(), duration=5000).release().perform() h.add_text().click() h.add_text_field().send_keys(blast_url) h.done_button().click() h.next_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click()
def test_opening_text_blast(self): # Login as account02 LoginWith().user(account02, password02, driver) # Opens text blast with +username, URL, and location log("Opening text blast and checking +username, URL, and location") h.name(account01).click(), sleep(2) h.swipe_view_location().click(), sleep(3), driver.press_keycode(4), sleep(2) ta(driver).press(x=sw * .17, y=sh * .23).release().perform() # clicks +username h.swipe_view_add().click(), sleep(2) h.swipe_view_url_card().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
def test_opening_video_blast(self): # Opens video with +username try: sleep(4) if driver.find_element_by_id("com.radicalapps.cyberdust:id/overlay_video_view"): log("Video loaded successfully") except Exception: log("Video did not load", "Warning") h.swipe_view_text().click() h.swipe_view_add().click(), sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300) # Opens video with URL h.swipe_view_text().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * 0.800, sh * 0.300, sw * 0.100, sh * 0.300, 300)
def test_sending_video_blast_01(self): # Takes video, adds +username, creates blast list, then sends to that blast list log("Sending video to newly created blast list") h.action_menu().click() h.action_menu_media().click() h.video_button().click() ta(driver).long_press(h.photo_button(), duration=5000).release().perform() h.add_text().click() h.add_text_field().send_keys(blast_username) h.done_button().click() h.next_button().click() h.create_blast_list().click() h.blast_list_field().send_keys("My Test List") h.OK_button().click() h.username(account02).click() h.username(account03).click() h.OK_button().click() h.send_to_blast_list().click() h.blast_Ok_button().click()
def test_opening_video_blast(self): # Opens video with +username try: sleep(4) if driver.find_element_by_id( "com.radicalapps.cyberdust:id/overlay_video_view"): log("Video loaded successfully") except Exception: log("Video did not load", "Warning") h.swipe_view_text().click() h.swipe_view_add().click(), sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300) # Opens video with URL h.swipe_view_text().click(), sleep(4) h.back_button().click(), sleep(1) driver.swipe(sw * .800, sh * .300, sw * .100, sh * .300, 300)
def test_sending_text_for_replies(self): # Sends text blast for reply test on other account log("Sending text blast for reply test") h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys("Reply test") h.OK_button().click() h.blast_friends().click() h.username(account02).click() h.blast_Ok_button().click() # Deletes blast list log("Deleting blast list") h.blast_lists().click() h.blast_list_expand() h.blast_list_edit().click() h.blast_list_more().click() h.delete_list().click() h.confirm().click()
def test_reply_to_blast(self): # Opens blast and tests reply functionality log("Testing reply functionality") h.swipe_view_reply().click() h.swipe_view_reply().send_keys("Test reply") h.swipe_view_reply_send().click() h.swipe_view_reply().click() h.swipe_view_reply().send_keys(blast_username[:-2]) log("Testing if +usernames can be tapped") h.swipe_view_reblast().click() h.swipe_view_reply_send().click() h.swipe_view_reply_monkey().click() h.swipe_view_monkey().click() h.swipe_view_emoji_cancel().click() h.swipe_view_reply_media().click() log("Testing photo and video replies") h.photo_button().click() h.photo_pen().click() driver.swipe(h.photo_back_button().location['x'] + 50, h.photo_back_button().location['y'] - 50, h.photo_pen().location['x'], h.photo_pen().location['y'] + 50) h.swipe_view_photo_send().click() h.swipe_view_reply_media().click() h.video_button().click() ta(driver).long_press(h.photo_button(), duration=5000).release().perform() h.swipe_view_photo_send().click(), sleep(4) driver.press_keycode(4)
def test_reply_to_blast(self): # Opens blast and tests reply functionality log("Testing reply functionality") h.swipe_view_reply().click() h.swipe_view_reply().send_keys("Test reply") h.swipe_view_reply_send().click() h.swipe_view_reply().click() h.swipe_view_reply().send_keys(blast_username[:-2]) log("Testing if +usernames can be tapped") h.swipe_view_reblast().click() h.swipe_view_reply_send().click() h.swipe_view_reply_monkey().click() h.swipe_view_monkey().click() h.swipe_view_emoji_cancel().click() h.swipe_view_reply_media().click() log("Testing photo and video replies") h.photo_button().click() h.photo_pen().click() driver.swipe( h.photo_back_button().location["x"] + 50, h.photo_back_button().location["y"] - 50, h.photo_pen().location["x"], h.photo_pen().location["y"] + 50, ) h.swipe_view_photo_send().click() h.swipe_view_reply_media().click() h.video_button().click() ta(driver).long_press(h.photo_button(), duration=5000).release().perform() h.swipe_view_photo_send().click(), sleep(4) driver.press_keycode(4)
def test_sending_photo_blast_02(self): # Sends non public photo blast with +username to the new blast list log("Sending non public photo blast") h.action_menu().click() h.action_menu_media().click() h.photo_button().click() h.add_text().click() h.add_text_field().send_keys(blast_username) h.done_button().click() h.next_button().click() h.make_public().click() h.send_to_blast_list().click() h.blast_Ok_button().click() # Deletes blast list log("Deleting renamed blast list") h.blast_lists().click() h.blast_list_expand() h.blast_list_edit().click() h.blast_list_more().click() h.delete_list().click() h.confirm().click()
def test_sending_photo_blast_01(self): # Sends photo blast with drawing and URL to all followers log("Sending photo blast with drawing and text to all followers") h.action_menu().click() h.action_menu_media().click() h.photo_button().click() h.photo_pen().click() driver.swipe(h.photo_back_button().location['x'] + 50, h.photo_back_button().location['y'] - 50, h.photo_pen().location['x'], h.photo_pen().location['y'] + 50) h.photo_color().click() driver.swipe(h.next_button().location['x'] + 100, h.next_button().location['y'] - 50, h.photo_location_button().location['x'] + 50, h.photo_location_button().location['y'] + 50) h.add_text().click() h.add_text_field().send_keys(blast_url) h.done_button().click() h.next_button().click() h.blast_all_followers().click() h.blast_Ok_button().click()
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 h.blast_list_edit().click() h.blast_list_more().click() log("Deleting pre-existing blast list first") h.delete_list().click() h.confirm().click() h.blast_lists().click() except Exception: pass h.blast_list_field().send_keys("List from Blasts tab") h.OK_button().click() h.username(account02).click() h.username(account03).click() h.OK_button().click() # Sends text blast with +username, URL, and location to blast list log("Sending text blast to blast list") h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys(blast_username + " " + blast_url) h.text_location_button().click() h.current_location().click() h.OK_button().click() h.send_to_blast_list().click() h.blast_Ok_button().click() # Edits participants and renames blast list log("Editing blast list") h.blast_lists().click() h.blast_list_expand() # Doesn't need .click() attribute h.blast_list_edit().click() h.username(account03).click() h.blast_list_more().click() h.rename_list().click() h.rename_blast_list().send_keys("Edited blast list") h.OK_button().click(), sleep(1) h.OK_button().click() h.back_button().click()
def check_reblast_count(self): LoginWith().user(account03, password03, driver) try: if h.name("24", 10): log("Blast count correct") h.blast_more_button().click() log("Deleting blasts") h.blast_more_delete().click() except Exception: log("Blast count incorrect", "Warning")
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 h.blast_list_edit().click() h.blast_list_more().click() log("Deleting pre-existing blast list first") h.delete_list().click() h.confirm().click() h.blast_lists().click() except Exception: pass h.blast_list_field().send_keys("List from Blasts tab") h.OK_button().click() h.username(account02).click() h.username(account03).click() h.OK_button().click() # Sends text blast with +username, URL, and location to blast list log("Sending text blast to blast list") h.action_menu().click() h.action_menu_text().click() h.dust_blast_field().send_keys(blast_username + " " + blast_url) h.text_location_button().click() h.current_location().click() h.OK_button().click() h.send_to_blast_list().click() h.blast_Ok_button().click() # Edits participants and renames blast list log("Editing blast list") h.blast_lists().click() h.blast_list_expand() # Doesn't need .click() attribute h.blast_list_edit().click() h.username(account03).click() h.blast_list_more().click() h.rename_list().click() h.rename_blast_list().send_keys("Edited blast list") h.OK_button().click(), sleep(1) h.OK_button().click() h.back_button().click()
def test_profile_picture(self): # Takes a picture with camera and sets as profile picture s.profile_picture().click() log("Taking a photo and setting it as the profile picture") s.camera_button().click(), sleep(3) driver.press_keycode(25), sleep(1), driver.press_keycode(27), sleep( 5) # Takes picture using Android keycode try: driver.find_element_by_id("com.motorola.camera:id/review_approve" ).click() # For Moto phones except Exception: pass try: driver.find_element_by_id("com.android.camera:id/select_this" ).click() # For older HTC one phones except Exception: pass try: ta(driver).press( x=1660, y=530).release().perform() # For new HTC One phones except Exception: pass try: driver.find_element_by_name("OK").click() # For Galaxy phones except Exception: pass try: driver.find_element_by_id("com.android.camera2:id/done_button" ).click() # For Nexus phones except Exception: pass try: m.profile_picture_done(5).click(), sleep(3) except Exception: log("Could not take a photo, going back", "Warning") for i in range(2): driver.press_keycode(4), sleep( 1) # If none of the above works, go back s.skip_button() log("Skipping checking contacts and sending text message") s.OK_button().click() s.skip_button().click() s.done_button().click() log("New account, %s, created" % account_name)
def test_logout_login(self): # Logout and login log("Testing logout and login") driver.scroll(m.friends(), m.back_button()) m.logout().click() m.confirm().click() m.login_button().click() m.login_username().send_keys(account_name.upper()) m.login_password().send_keys(account_pw) m.login_OK().click() log("Username is not case sensitive") # Deletes account m.more_button().click(), sleep(1) driver.scroll(m.followers(), m.back_button()) m.delete_account().click() log("Deleting account") m.confirm().click() log("On boarding test completed", "Complete")
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")
def test_profile_picture(self): # Takes a picture with camera and sets as profile picture s.profile_picture().click() log("Taking a photo and setting it as the profile picture") s.camera_button().click(), sleep(3) driver.press_keycode(25), sleep(1), driver.press_keycode(27), sleep(5) # Takes picture using Android keycode try: driver.find_element_by_id("com.motorola.camera:id/review_approve").click() # For Moto phones except Exception: pass try: driver.find_element_by_id("com.android.camera:id/select_this").click() # For older HTC one phones except Exception: pass try: ta(driver).press(x=1660, y=530).release().perform() # For new HTC One phones except Exception: pass try: driver.find_element_by_name("OK").click() # For Galaxy phones except Exception: pass try: driver.find_element_by_id("com.android.camera2:id/done_button").click() # For Nexus phones except Exception: pass try: m.profile_picture_done(5).click(), sleep(3) except Exception: log("Could not take a photo, going back", "Warning") for i in range(2): driver.press_keycode(4), sleep(1) # If none of the above works, go back s.skip_button() log("Skipping checking contacts and sending text message") s.OK_button().click() s.skip_button().click() s.done_button().click() log("New account, %s, created" % account_name)
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")
def test_checking_blast_replies(self): # Login with account01 to check replies LoginWith().user(account01, password01, driver) # Opens replies from account02 and does a check to see if they were all received h.dusts_tab().click() h.username(account02).click() log("Checking if all replies were successful") try: sleep(2) driver.save_screenshot("C:\Screenshots\screenshottest01.jpg") if driver.find_elements_by_id("com.radicalapps.cyberdust:id/chat_bubble_view_message_text")and\ driver.find_element_by_id("com.radicalapps.cyberdust:id/emoji_view_image")and\ driver.find_element_by_id("com.radicalapps.cyberdust:id/photo_view_image")and\ driver.find_element_by_id("com.radicalapps.cyberdust:id/video_play_button"): log("All replies successfully received from %s" % account02) except Exception: log("All replies were not received", "Warning") sleep(1) driver.press_keycode(4)
def reblast_setup(self): log("Setting up reblast test") LoginWith().user(account02, password02, driver) 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 h.blast_list_edit().click() h.blast_list_more().click() log("Deleting pre-existing blast list first") h.delete_list().click() h.confirm().click() h.blast_lists().click() except Exception: pass h.blast_list_field().send_keys("Reblast List") h.OK_button().click() h.username(account01).click() h.username(account03).click() h.OK_button().click()
def reblast_video_no_loc(self): h.username(account01).click() log("Reblasting video blast without location to all followers") h.swipe_view_reblast().click() h.blast_all_followers().click() h.blast_Ok_button().click() h.swipe_view_reply() driver.swipe(sw*.800, sh*.300, sw*.100, sh*.300, 300) log("Reblasting video blast without location to blast list") h.swipe_view_reblast().click() h.send_to_blast_list().click() h.blast_Ok_button().click() h.swipe_view_reply() driver.swipe(sw*.800, sh*.300, sw*.100, sh*.300, 300) log("Reblasting video blast without location to a friend") h.swipe_view_reblast().click() h.blast_friends().click() h.username(account03).click() h.blast_Ok_button().click() h.swipe_view_reply() driver.press_keycode(4)
def test_checking_blast_replies(self): # Login with account01 to check replies LoginWith().user(account01, password01, driver) # Opens replies from account02 and does a check to see if they were all received h.dusts_tab().click() h.username(account02).click() log("Checking if all replies were successful") try: sleep(2) driver.save_screenshot("C:\Screenshots\screenshottest01.jpg") if ( driver.find_elements_by_id("com.radicalapps.cyberdust:id/chat_bubble_view_message_text") and driver.find_element_by_id("com.radicalapps.cyberdust:id/emoji_view_image") and driver.find_element_by_id("com.radicalapps.cyberdust:id/photo_view_image") and driver.find_element_by_id("com.radicalapps.cyberdust:id/video_play_button") ): log("All replies successfully received from %s" % account02) except Exception: log("All replies were not received", "Warning") sleep(1) driver.press_keycode(4)