Exemplo n.º 1
0
 def is_search_result_exists(name):
     if Properties.if_ios():
         return WebLink(
             Properties.get_play_list_page_locator_map().get_locator(
                 SearchPageLocators.resultChooser)).is_presented()
     return SearchPage.swipe_down_to_element(
         SearchPage.return_search_result(name).click())
Exemplo n.º 2
0
 def return_similar_to_text_input():
     return InputField(
         Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTrackSimilarToTxt))
Exemplo n.º 3
0
 def return_current_track_input():
     return InputField(
         Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.currentTrackName))
Exemplo n.º 4
0
 def return_pause_button():
     return Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.pauseButton))
Exemplo n.º 5
0
 def alert_accept_alt():
     Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.acceptAlert)).click()
Exemplo n.º 6
0
 def _swipe_to_last_track():
     if not Properties.if_ios():
         PlayListPage._swipe_to_current_artist()
     PlayListPage.swipe_up()
     PlayListPage.swipe_up_to_element(Button(Properties.get_play_list_page_locator_map().
                                             get_locator(PlayListPageLocators.prevTracks)))
Exemplo n.º 7
0
 def return_next_set_button():
     return Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.somethingDifferent))
Exemplo n.º 8
0
 def return_next_track_button():
     return Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTrackBtn))
Exemplo n.º 9
0
 def click_on_change_volume():
     Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.volumeButton)).click()
     time.sleep(1)
Exemplo n.º 10
0
 def play_next_artist(number=0):
     if not Properties.if_ios():
         PlayListPage._swipe_to_next_artist()
     artists = WebLink(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTracks))
     artist = artists.get_elements()[number]
     artist.click()
Exemplo n.º 11
0
 def next_track(number=0):
     if not Properties.if_ios():
         PlayListPage._swipe_to_next_track()
     tracks = WebLink(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTracks))
     track = tracks.get_elements()[number]
     return track.text
Exemplo n.º 12
0
 def last_track():
     PlayListPage._swipe_to_last_track()
     tracks = WebLink(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.prevTracks))
     track = tracks.get_elements()[tracks.get_elements().__len__() - 1]
     return track.text
Exemplo n.º 13
0
 def last_artist():
     if not Properties.if_ios():
         PlayListPage._swipe_to_last_artist()
     artists = WebLink(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.prevArtists))
     artist = artists.get_elements()[artists.get_elements().__len__() - 1]
     return artist.text
Exemplo n.º 14
0
 def _swipe_to_next_track_btn():
     PlayListPage.swipe_down_to_element(
         Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTrackBtn)),
         swipe_percent=25)
Exemplo n.º 15
0
 def _swipe_to_next_track():
     PlayListPage._swipe_to_current_artist()
     PlayListPage.swipe_down_to_element(
         Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTracks)))
Exemplo n.º 16
0
 def return_playing_from_input():
     return InputField(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.playingFrom))
Exemplo n.º 17
0
 def return_prev_track_button():
     return Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.prevTracks))
Exemplo n.º 18
0
 def decrease_volume_by_application_button(taps_quantity=1):
     if Properties.if_ios():
         for i in range(taps_quantity):
             Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.decreaseVolumeButton)).click()
     else:
         PlayListPage._decrease_volume_by_application_button(taps_quantity)
Exemplo n.º 19
0
 def return_next_track_skips_left():
     return Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.nextTrackSkipsLeft))
Exemplo n.º 20
0
 def click_on_search():
     Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.searchBtn)).click()
Exemplo n.º 21
0
 def click_on_cones_list():
     Button(Properties.get_play_list_page_locator_map().get_locator(PlayListPageLocators.conesListBtn)).click()
Exemplo n.º 22
0
 def _swipe_to_last_artist():
     PlayListPage._swipe_to_current_artist()
     PlayListPage.swipe_up()
     PlayListPage.swipe_up_to_element(Button(Properties.get_play_list_page_locator_map().
                                             get_locator(PlayListPageLocators.prevArtists)))