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

Unified Diff: tools/perf/page_sets/key_silk_cases.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/key_mobile_sites.py ('k') | tools/perf/page_sets/plus_alt_posts_photos.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/key_silk_cases.py
diff --git a/tools/perf/page_sets/key_silk_cases.py b/tools/perf/page_sets/key_silk_cases.py
index 4b0920ff3c893823372805ed10adc32aee78431c..0a12a62e59dd26759f87ba124ad781dc5b4aca3a 100644
--- a/tools/perf/page_sets/key_silk_cases.py
+++ b/tools/perf/page_sets/key_silk_cases.py
@@ -364,11 +364,11 @@ class Page18(KeySilkCasesPage):
self.ToggleDrawer(action_runner)
def ToggleDrawer(self, action_runner):
- action_runner.RunAction(TapAction(
- {
- 'selector': '#menu-button',
- 'wait_after' : {'seconds': 1}
- }))
+ interaction = action_runner.BeginInteraction(
+ 'Action_TapAction', is_smooth=True)
+ action_runner.TapElement('#menu-button')
+ action_runner.Wait(1)
+ interaction.End()
class Page19(KeySilkCasesPage):
@@ -379,10 +379,11 @@ class Page19(KeySilkCasesPage):
page_set=page_set)
def ToggleDrawer(self, action_runner):
- action_runner.RunAction(TapAction(
- {
- 'selector': '#menu-button'
- }))
+ interaction = action_runner.BeginGestureInteraction(
+ 'TapAction', is_smooth=True)
+ action_runner.TapElement('#menu-button')
+ interaction.End()
+
interaction = action_runner.BeginInteraction('Wait', is_smooth=True)
action_runner.WaitForJavaScriptCondition(
'document.getElementById("nav-drawer").active')
@@ -456,14 +457,12 @@ class Page21(KeySilkCasesPage):
def ExpandKnowledgeCard(self, action_runner):
# expand card
- action_runner.RunAction(TapAction(
- {
- 'element_function': '''
- function(callback) {
- callback(document.getElementsByClassName("vk_arc")[0]);
- }''',
- 'wait_after': {'seconds': 2}
- }))
+ interaction = action_runner.BeginInteraction(
+ 'Action_TapAction', is_smooth=True)
+ action_runner.TapElement(
+ element_function='document.getElementsByClassName("vk_arc")[0]')
+ action_runner.Wait(2)
+ interaction.End()
def RunNavigateSteps(self, action_runner):
« no previous file with comments | « tools/perf/page_sets/key_mobile_sites.py ('k') | tools/perf/page_sets/plus_alt_posts_photos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698