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

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: Rebasing to head. 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
« no previous file with comments | « tools/perf/page_sets/startup_pages.py ('k') | tools/perf/page_sets/top_25.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed5f9b92da8cd582e2230d3489ffacd82cde07c3..2ec8247651d9621294ed4e2d063f542ddc64cda7 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(text='Next')
class Gmail(SimpleScrollPage):
@@ -35,9 +34,9 @@ class Gmail(SimpleScrollPage):
def RunNavigateSteps(self, action_runner):
super(Gmail, self).RunNavigateSteps(action_runner)
- action_runner.RunAction(WaitAction(
- {'javascript' : 'window.gmonkey !== undefined &&'
- 'document.getElementById("gb") !== null'}))
+ action_runner.WaitForJavaScriptCondition(
+ 'window.gmonkey !== undefined &&'
+ 'document.getElementById("gb") !== null')
class GoogleCalendar(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(text='About')
class Top10PageSet(page_set_module.PageSet):
« no previous file with comments | « tools/perf/page_sets/startup_pages.py ('k') | tools/perf/page_sets/top_25.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698