Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: tools/perf/page_sets/plus_alt_posts_photos.py

Issue 321563003: Add Wait* API to ActionRunner to wrap over WaitAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/plus_alt_posts_photos.py
diff --git a/tools/perf/page_sets/plus_alt_posts_photos.py b/tools/perf/page_sets/plus_alt_posts_photos.py
index 2c18960e2a6c279aa640b3c8349c6b82833080db..9ff11d1c436ac3cfcf0242e251c0f9c7ec2062c5 100644
--- a/tools/perf/page_sets/plus_alt_posts_photos.py
+++ b/tools/perf/page_sets/plus_alt_posts_photos.py
@@ -23,44 +23,25 @@ class PlusAltPostsPhotosPage(page_module.Page):
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {
- 'text': 'Barack Obama',
- 'condition': 'element'
- }))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'span[guidedhelpid="posts_tab_profile"][class*="s6U8x"]'
- }))
+ action_runner.WaitForElement(contains_text='Barack Obama')
+ action_runner.WaitForElement(
+ 'span[guidedhelpid="posts_tab_profile"][class*="s6U8x"]')
def RunEndure(self, action_runner):
action_runner.RunAction(ClickElementAction(
{
'selector': 'span[guidedhelpid="posts_tab_profile"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'span[guidedhelpid="posts_tab_profile"][class*="s6U8x"]'
- }))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 5
- }))
+ action_runner.WaitForElement(
+ 'span[guidedhelpid="posts_tab_profile"][class*="s6U8x"]')
+ action_runner.Wait(5)
action_runner.RunAction(ClickElementAction(
{
'selector': 'span[guidedhelpid="photos_tab_profile"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'span[guidedhelpid="photos_tab_profile"][class*="s6U8x"]'
- }))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 5
- }))
+ action_runner.WaitForElement(
+ 'span[guidedhelpid="photos_tab_profile"][class*="s6U8x"]')
+ action_runner.Wait(5)
class PlusAltPostsPhotosPageSet(page_set_module.PageSet):

Powered by Google App Engine
This is Rietveld 408576698