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

Unified Diff: tools/perf/page_sets/polymer.py

Issue 323833003: Create ActionRunner wrapper API over TapAction and ClickElementAction. (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/plus_alt_posts_photos.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/polymer.py
diff --git a/tools/perf/page_sets/polymer.py b/tools/perf/page_sets/polymer.py
index 5ec680805aa13300176c338adf66d33bdaaecaed..860ab89a0e9ded09f84bd02d8a0500e838dbc396 100644
--- a/tools/perf/page_sets/polymer.py
+++ b/tools/perf/page_sets/polymer.py
@@ -37,22 +37,18 @@ class PolymerCalculatorPage(PolymerPage):
self.SlidePanel(action_runner)
def TapButton(self, action_runner):
- action_runner.RunAction(TapAction(
- {
- 'element_function': '''
- function(callback) {
- callback(
- document.querySelector(
- 'body /deep/ #outerPanels'
- ).querySelector(
- '#standard'
- ).shadowRoot.querySelector(
- 'paper-calculator-key[label="5"]'
- )
- );
- }''',
- 'wait_after': { 'seconds': 2 }
- }))
+ interaction = action_runner.BeginInteraction(
+ 'Action_TapAction', is_smooth=True)
+ action_runner.TapElement(element_function='''
+ document.querySelector(
+ 'body /deep/ #outerPanels'
+ ).querySelector(
+ '#standard'
+ ).shadowRoot.querySelector(
+ 'paper-calculator-key[label="5"]'
+ )''')
+ action_runner.Wait(2)
+ interaction.End()
def SlidePanel(self, action_runner):
action_runner.RunAction(SwipeAction(
« no previous file with comments | « tools/perf/page_sets/plus_alt_posts_photos.py ('k') | tools/perf/page_sets/top_25.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698