Commit ed19a73f authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[perf] Add play:media:soundcloud:2018 system health story

Bug: 878390
Change-Id: Ida4352f5409bfed8dcdbe9a8cabd22014284c981
Reviewed-on: https://chromium-review.googlesource.com/1219689
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594652}
parent a3b07c6a
......@@ -240,6 +240,9 @@
"play:media:soundcloud": {
"DEFAULT": "system_health_desktop_030.wprgo"
},
"play:media:soundcloud:2018": {
"DEFAULT": "system_health_desktop_57d9c71c88.wprgo"
},
"search:portal:google": {
"DEFAULT": "system_health_desktop_022.wprgo"
}
......
57d9c71c88accb07a365fd975c3c8054eeb19880
\ No newline at end of file
......@@ -88,7 +88,26 @@ class SoundCloudDesktopStory(_MediaStory):
STOP_SELECTOR = '.playControl.playControls__icon.sc-ir.playing'
TIME_SELECTOR = '.playbackTimeline__timePassed>span[aria-hidden=true]'
SEARCH_SELECTOR = '.headerSearch'
SEARCH_QUERY = 'SSmooth Jazz' # First S for some reason gets ommited.
SEARCH_QUERY = 'SSmooth Jazz' # First S for some reason gets omitted.
def _NavigateToMedia(self, action_runner):
self._WaitForAndClickElementBySelector(action_runner, self.SEARCH_SELECTOR)
action_runner.Wait(1) # Add 1 second wait to make the browsing realistic.
action_runner.EnterText(self.SEARCH_QUERY)
action_runner.PressKey('Return')
class SoundCloudDesktopStory2018(_MediaStory):
"""Load soundcloud.com, search for "Smooth Jazz", then play a song."""
NAME = 'play:media:soundcloud:2018'
URL = 'https://soundcloud.com'
TAGS = [story_tags.YEAR_2018]
PLAY_SELECTOR = '.sc-button-play.playButton.sc-button.sc-button-xlarge'
STOP_SELECTOR = '.playControl.sc-ir.playing'
TIME_SELECTOR = '.playbackTimeline__timePassed>span[aria-hidden=true]'
SEARCH_SELECTOR = '.headerSearch'
SEARCH_QUERY = 'SSmooth Jazz' # First S for some reason gets omitted.
def _NavigateToMedia(self, action_runner):
self._WaitForAndClickElementBySelector(action_runner, self.SEARCH_SELECTOR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment