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

Unified Diff: tools/telemetry/telemetry/page/actions/wait.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/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 6ff37d803577a2b0a0358a02095049d33f50f25e..9de6b484f7f56f0a786416354c0d47d80b7e6e93 100644
--- a/tools/telemetry/telemetry/page/actions/wait.py
+++ b/tools/telemetry/telemetry/page/actions/wait.py
@@ -42,6 +42,9 @@ class WaitAction(page_action.PageAction):
'null)'
'.singleNodeValue' % re.escape(self.xpath))
tab.WaitForJavaScriptExpression('%s != null' % code, self.timeout)
+ elif hasattr(self, 'element_function'):
+ tab.WaitForJavaScriptExpression(
+ '%s != null' % self.element_function, self.timeout)
else:
raise page_action.PageActionFailed(
'No element condition given to wait')

Powered by Google App Engine
This is Rietveld 408576698