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

Unified Diff: tools/perf/page_sets/calendar_forward_backward.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
Index: tools/perf/page_sets/calendar_forward_backward.py
diff --git a/tools/perf/page_sets/calendar_forward_backward.py b/tools/perf/page_sets/calendar_forward_backward.py
index f4ca483ef41e3f2a0499d1a2fbfcac4b62e07ead..609b59cf6810601e26f800c6714774ddcf07387e 100644
--- a/tools/perf/page_sets/calendar_forward_backward.py
+++ b/tools/perf/page_sets/calendar_forward_backward.py
@@ -23,15 +23,8 @@ class CalendarForwardBackwardPage(page_module.Page):
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- 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"]')
action_runner.ExecuteJavaScript('''
(function() {
var elem = document.createElement('meta');
@@ -45,106 +38,50 @@ class CalendarForwardBackwardPage(page_module.Page):
{
'selector': 'div[class~="navForward"]'
}))
- 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"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navForward"]'
}))
- 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"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navForward"]'
}))
- 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"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navForward"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 2
- }))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'div[class~="navBack"]'
- }))
+ action_runner.Wait(2)
+ action_runner.WaitForElement('div[class~="navBack"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navBack"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 2
- }))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'div[class~="navBack"]'
- }))
+ action_runner.Wait(2)
+ action_runner.WaitForElement('div[class~="navBack"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navBack"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 2
- }))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'div[class~="navBack"]'
- }))
+ action_runner.Wait(2)
+ action_runner.WaitForElement('div[class~="navBack"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navBack"]'
}))
- action_runner.RunAction(WaitAction(
- {
- 'seconds': 2
- }))
- action_runner.RunAction(WaitAction(
- {
- 'condition': 'element',
- 'selector': 'div[class~="navBack"]'
- }))
+ action_runner.Wait(2)
+ action_runner.WaitForElement('div[class~="navBack"]')
action_runner.RunAction(ClickElementAction(
{
'selector': 'div[class~="navBack"]'
}))
- 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 CalendarForwardBackwardPageSet(page_set_module.PageSet):
« no previous file with comments | « tools/perf/page_sets/browser_control_click.py ('k') | tools/perf/page_sets/gmail_alt_threadlist_conversation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698