|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -from selenium import webdriver |
| 15 | +# pylint: disable=too-many-lines,too-many-public-methods,too-many-statements,no-self-use |
16 | 16 |
|
17 | | -from .mobilecommand import MobileCommand as Command |
18 | | -from .errorhandler import MobileErrorHandler |
19 | | -from .switch_to import MobileSwitchTo |
20 | | -from .webelement import WebElement as MobileWebElement |
21 | | -from .imagelement import ImageElement |
| 17 | +import base64 |
| 18 | +import copy |
22 | 19 |
|
23 | | -from appium.webdriver.clipboard_content_type import ClipboardContentType |
24 | | -from appium.webdriver.common.mobileby import MobileBy |
25 | | -from appium.webdriver.common.touch_action import TouchAction |
26 | | -from appium.webdriver.common.multi_action import MultiAction |
| 20 | +from selenium import webdriver |
27 | 21 |
|
28 | 22 | from selenium.webdriver.common.by import By |
29 | 23 | from selenium.webdriver.support.ui import WebDriverWait |
30 | | -from selenium.common.exceptions import (TimeoutException, |
31 | | - WebDriverException, InvalidArgumentException, NoSuchElementException) |
| 24 | +from selenium.common.exceptions import (TimeoutException, WebDriverException, InvalidArgumentException, NoSuchElementException) |
32 | 25 |
|
33 | 26 | from selenium.webdriver.remote.command import Command as RemoteCommand |
34 | 27 |
|
35 | | -import base64 |
36 | | -import copy |
| 28 | +from appium.webdriver.clipboard_content_type import ClipboardContentType |
| 29 | +from appium.webdriver.common.mobileby import MobileBy |
| 30 | +from appium.webdriver.common.touch_action import TouchAction |
| 31 | +from appium.webdriver.common.multi_action import MultiAction |
| 32 | + |
| 33 | +from .mobilecommand import MobileCommand as Command |
| 34 | +from .errorhandler import MobileErrorHandler |
| 35 | +from .switch_to import MobileSwitchTo |
| 36 | +from .webelement import WebElement as MobileWebElement |
| 37 | +from .imagelement import ImageElement |
37 | 38 |
|
38 | 39 | DEFAULT_MATCH_THRESHOLD = 0.5 |
39 | 40 |
|
@@ -411,29 +412,29 @@ def find_elements_by_image(self, png_img_path, |
411 | 412 | pass |
412 | 413 | return els |
413 | 414 |
|
414 | | - def find_element_by_accessibility_id(self, id): |
| 415 | + def find_element_by_accessibility_id(self, accessibility_id): |
415 | 416 | """Finds an element by accessibility id. |
416 | 417 |
|
417 | 418 | :Args: |
418 | | - - id - a string corresponding to a recursive element search using the |
| 419 | + - accessibility_id - a string corresponding to a recursive element search using the |
419 | 420 | Id/Name that the native Accessibility options utilize |
420 | 421 |
|
421 | 422 | :Usage: |
422 | 423 | driver.find_element_by_accessibility_id() |
423 | 424 | """ |
424 | | - return self.find_element(by=By.ACCESSIBILITY_ID, value=id) |
| 425 | + return self.find_element(by=By.ACCESSIBILITY_ID, value=accessibility_id) |
425 | 426 |
|
426 | | - def find_elements_by_accessibility_id(self, id): |
| 427 | + def find_elements_by_accessibility_id(self, accessibility_id): |
427 | 428 | """Finds elements by accessibility id. |
428 | 429 |
|
429 | 430 | :Args: |
430 | | - - id - a string corresponding to a recursive element search using the |
| 431 | + - accessibility_id - a string corresponding to a recursive element search using the |
431 | 432 | Id/Name that the native Accessibility options utilize |
432 | 433 |
|
433 | 434 | :Usage: |
434 | 435 | driver.find_elements_by_accessibility_id() |
435 | 436 | """ |
436 | | - return self.find_elements(by=By.ACCESSIBILITY_ID, value=id) |
| 437 | + return self.find_elements(by=By.ACCESSIBILITY_ID, value=accessibility_id) |
437 | 438 |
|
438 | 439 | def create_web_element(self, element_id): |
439 | 440 | """ |
@@ -1400,6 +1401,8 @@ def battery_info(self): |
1400 | 1401 | """ |
1401 | 1402 | return self.execute_script('mobile: batteryInfo') |
1402 | 1403 |
|
| 1404 | + |
| 1405 | + # pylint: disable=protected-access |
1403 | 1406 | def _addCommands(self): |
1404 | 1407 | self.command_executor._commands[Command.CONTEXTS] = \ |
1405 | 1408 | ('GET', '/session/$sessionId/contexts') |
|
0 commit comments