| Index: tools/telemetry/telemetry/page/click_element_action.py
|
| diff --git a/tools/telemetry/telemetry/click_element_action.py b/tools/telemetry/telemetry/page/click_element_action.py
|
| similarity index 85%
|
| rename from tools/telemetry/telemetry/click_element_action.py
|
| rename to tools/telemetry/telemetry/page/click_element_action.py
|
| index eabc65bc79bf24ed0c89bd04dce6b72db7cf3b9f..ff1784c83588ac3b9742a93095e7bc05acf71a3d 100644
|
| --- a/tools/telemetry/telemetry/click_element_action.py
|
| +++ b/tools/telemetry/telemetry/page/click_element_action.py
|
| @@ -1,10 +1,10 @@
|
| # 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 telemetry import inspector_runtime
|
| -from telemetry import page as page_module
|
| -from telemetry import page_action
|
| -from telemetry import util
|
| +from telemetry.core import util
|
| +from telemetry.core import exceptions
|
| +from telemetry.page import page as page_module
|
| +from telemetry.page import page_action
|
|
|
| class ClickElementAction(page_action.PageAction):
|
| def __init__(self, attributes=None):
|
| @@ -17,14 +17,14 @@ class ClickElementAction(page_action.PageAction):
|
| code = 'document.querySelector(\'' + self.selector + '\').click();'
|
| try:
|
| tab.ExecuteJavaScript(code)
|
| - except inspector_runtime.EvaluateException:
|
| + except exceptions.EvaluateException:
|
| raise page_action.PageActionFailed(
|
| 'Cannot find element with selector ' + self.selector)
|
| else:
|
| callback_code = 'function(element) { element.click(); }'
|
| try:
|
| util.FindElementAndPerformAction(tab, self.text, callback_code)
|
| - except inspector_runtime.EvaluateException:
|
| + except exceptions.EvaluateException:
|
| raise page_action.PageActionFailed(
|
| 'Cannot find element with text ' + self.text)
|
|
|
|
|