Chromium Code Reviews| Index: tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py |
| diff --git a/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py b/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6f5c2ddf07756931ec3d857c4d6f4250dfb2a501 |
| --- /dev/null |
| +++ b/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py |
| @@ -0,0 +1,23 @@ |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from chrome_remote_control import javascript_runner_interaction |
| +from chrome_remote_control import page_interaction |
| + |
| +class ClickElementInteraction( |
| + javascript_runner_interaction.JavaScriptRunnerInteraction): |
|
nduca
2012/11/07 04:13:49
how about movign these to interaction.py but as me
marja
2012/11/07 10:52:27
This is removed for now (I can add it in the next
|
| + def __init__(self, data): |
| + super(ClickElementInteraction, self).__init__( |
| + "click_element.js", "clickElement", data) |
| + |
| + def PerformInteraction(self, page, tab, test): |
| + test.WillPerformInteraction(self, page, tab) |
|
nduca
2012/11/07 04:13:49
I think the runner should call this, not the inter
marja
2012/11/07 10:52:27
Done. (This pattern was adopted from your CL, http
|
| + |
| + def DoClick(): |
| + self.InjectCode(tab) |
|
nduca
2012/11/07 04:13:49
self.InjectodeIfNeeded(tab, "click_element.js")
W
marja
2012/11/07 10:52:27
This code is now removed.
|
| + self.MakeJSCall(tab) |
| + tab.page.PerformActionAndWaitForNavigate(DoClick) |
| + |
| + test.DidPerformInteraction(self, page, tab) |
| + |
| +page_interaction.RegisterClass('click_element', ClickElementInteraction) |