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

Unified Diff: tools/telemetry/telemetry/page/actions/wait.py

Issue 180873008: Add support for python pageset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/telemetry/telemetry/page/actions/wait.py
diff --git a/tools/telemetry/telemetry/page/actions/wait.py b/tools/telemetry/telemetry/page/actions/wait.py
index 4cb8742f267be96fd298c2d7a62128d489acc596..d2c8073ef69dfb95e25542c1154fdfd7e1c950d8 100644
--- a/tools/telemetry/telemetry/page/actions/wait.py
+++ b/tools/telemetry/telemetry/page/actions/wait.py
@@ -18,6 +18,22 @@ class WaitAction(page_action.PageAction):
return (getattr(self, 'condition', None) == 'navigate' or
getattr(self, 'condition', None) == 'href_change')
+ def UntilTrue(self, expression):
nduca 2014/03/05 03:00:57 I think in the long term, I'd rather we remove th
nednguyen 2014/03/05 04:54:04 sgtm :)
+ self.SetAttributes({'javascript': expression})
+ return self
+
+ def UntilTextElementAvailable(self, text):
+ self.SetAttributes({'condition': 'element', 'text': text})
+ return self
+
+ def UntilSelectorElementAvailable(self, selector):
+ self.SetAttributes({'condition': 'element', 'selector': selector})
+ return self
+
+ def ForSeconds(self, seconds):
+ self.SetAttributes({'seconds': seconds})
+ return self
+
def RunAction(self, page, tab, previous_action):
tab.ExecuteJavaScript(
'console.time("' + self._GetUniqueTimelineMarkerName() + '")')

Powered by Google App Engine
This is Rietveld 408576698