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

Unified Diff: tools/perf/page_sets/top_10.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/top_10.py
diff --git a/tools/perf/page_sets/top_10.py b/tools/perf/page_sets/top_10.py
index 0668d79116dc2a789dbd88202f903ec3c496ef71..51e84527aef95dae5ae505b21fcfedc0d140cd1e 100644
--- a/tools/perf/page_sets/top_10.py
+++ b/tools/perf/page_sets/top_10.py
@@ -22,8 +22,7 @@ class Google(SimpleScrollPage):
def RunNavigateSteps(self, action_runner):
super(Google, self).RunNavigateSteps(action_runner)
- action_runner.RunAction(WaitAction(
- {'condition': 'element', 'text': 'Next'}))
+ action_runner.WaitForElement(contains_text='Next')
class Gmail(SimpleScrollPage):
@@ -55,9 +54,8 @@ class GoogleCalendar(SimpleScrollPage):
elem.content="initial-scale=1";
document.body.appendChild(elem);
})();''')
- action_runner.RunAction(WaitAction({'seconds' : 2}))
- action_runner.RunAction(WaitAction({
- 'condition' : 'element', 'selector' : 'div[class~="navForward"]'}))
+ action_runner.Wait(2)
+ action_runner.WaitForElement('div[class~="navForward"]')
class Youtube(SimpleScrollPage):
@@ -69,7 +67,7 @@ class Youtube(SimpleScrollPage):
def RunNavigateSteps(self, action_runner):
super(Youtube, self).RunNavigateSteps(action_runner)
- action_runner.RunAction(WaitAction({'seconds' : 2}))
+ action_runner.Wait(2)
class Facebook(SimpleScrollPage):
@@ -82,8 +80,7 @@ class Facebook(SimpleScrollPage):
def RunNavigateSteps(self, action_runner):
super(Facebook, self).RunNavigateSteps(action_runner)
- action_runner.RunAction(WaitAction(
- {'condition': 'element', 'text': 'About'}))
+ action_runner.WaitForElement(contains_text='About')
class Top10PageSet(page_set_module.PageSet):

Powered by Google App Engine
This is Rietveld 408576698