robotframework-appiumwindows 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/__init__.py +106 -106
  2. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/appium_path.py +10 -9
  3. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/__init__.py +21 -21
  4. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_applicationmanagement.py +595 -515
  5. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_element.py +1308 -1282
  6. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_logging.py +63 -63
  7. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_powershell.py +551 -553
  8. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_runonfailure.py +74 -74
  9. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_screenrecord.py +138 -138
  10. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_screenshot.py +105 -109
  11. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_waiting.py +163 -163
  12. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/_windows.py +271 -215
  13. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/keywords/keywordgroup.py +71 -70
  14. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/locators/__init__.py +7 -7
  15. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/locators/elementfinder.py +264 -264
  16. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/utils/__init__.py +50 -50
  17. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/utils/applicationcache.py +48 -48
  18. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/AppiumLibrary/version.py +2 -2
  19. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/LICENSE +20 -20
  20. robotframework_appiumwindows-0.1.2/PKG-INFO +214 -0
  21. robotframework_appiumwindows-0.1.2/README.md +185 -0
  22. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/pyproject.toml +38 -38
  23. robotframework_appiumwindows-0.1.2/robotframework_appiumwindows.egg-info/PKG-INFO +214 -0
  24. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/setup.cfg +4 -4
  25. robotframework_appiumwindows-0.1.0/PKG-INFO +0 -148
  26. robotframework_appiumwindows-0.1.0/README.md +0 -119
  27. robotframework_appiumwindows-0.1.0/robotframework_appiumwindows.egg-info/PKG-INFO +0 -148
  28. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/robotframework_appiumwindows.egg-info/SOURCES.txt +0 -0
  29. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/robotframework_appiumwindows.egg-info/dependency_links.txt +0 -0
  30. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/robotframework_appiumwindows.egg-info/requires.txt +0 -0
  31. {robotframework_appiumwindows-0.1.0 → robotframework_appiumwindows-0.1.2}/robotframework_appiumwindows.egg-info/top_level.txt +0 -0
@@ -1,106 +1,106 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- import os
4
- from AppiumLibrary.keywords import *
5
- from AppiumLibrary.version import VERSION
6
-
7
- __version__ = VERSION
8
-
9
-
10
- class AppiumLibrary(
11
- _LoggingKeywords,
12
- _RunOnFailureKeywords,
13
- _ElementKeywords,
14
- _WindowsKeywords,
15
- _PowershellKeywords,
16
- _ScreenshotKeywords,
17
- _ApplicationManagementKeywords,
18
- _WaitingKeywords,
19
- _ScreenrecordKeywords
20
- ):
21
- """AppiumLibrary is a Mobile App testing library for Robot Framework.
22
-
23
- = Locating or specifying elements =
24
-
25
- All keywords in AppiumLibrary that need to find an element on the page
26
- take an argument, either a ``locator`` or a ``webelement``. ``locator``
27
- is a string that describes how to locate an element using a syntax
28
- specifying different location strategies. ``webelement`` is a variable that
29
- holds a WebElement instance, which is a representation of the element.
30
-
31
- == Using locators ==
32
-
33
- By default, when a locator is provided, it is matched against the key attributes
34
- of the particular element type. For iOS and Android, key attribute is ``id`` for
35
- all elements and locating elements is easy using just the ``id``. For example:
36
-
37
- | Click Element id=my_element
38
-
39
- New in AppiumLibrary 1.4, ``id`` and ``xpath`` are not required to be specified,
40
- however ``xpath`` should start with ``//`` else just use ``xpath`` locator as explained below.
41
-
42
- For example:
43
-
44
- | Click Element my_element
45
- | Wait Until Page Contains Element //*[@type="android.widget.EditText"]
46
-
47
-
48
- Appium additionally supports some of the [https://w3c.github.io/webdriver/webdriver-spec.html|Mobile JSON Wire Protocol] locator strategies.
49
- It is also possible to specify the approach AppiumLibrary should take
50
- to find an element by specifying a lookup strategy with a locator
51
- prefix. Supported strategies are:
52
-
53
- | *Strategy* | *Example* | *Description* | *Note* |
54
- | identifier | Click Element `|` identifier=my_element | Matches by @id attribute | |
55
- | id | Click Element `|` id=my_element | Matches by @resource-id attribute | |
56
- | accessibility_id | Click Element `|` accessibility_id=button3 | Accessibility options utilize. | |
57
- | xpath | Click Element `|` xpath=//UIATableView/UIATableCell/UIAButton | Matches with arbitrary XPath | |
58
- | class | Click Element `|` class=UIAPickerWheel | Matches by class | |
59
- | android | Click Element `|` android=UiSelector().description('Apps') | Matches by Android UI Automator | |
60
- | ios | Click Element `|` ios=.buttons().withName('Apps') | Matches by iOS UI Automation | |
61
- | predicate | Click Element `|` predicate=name=="login" | Matches by iOS Predicate | Check PR: #196 |
62
- | chain | Click Element `|` chain=XCUIElementTypeWindow[1]/* | Matches by iOS Class Chain | |
63
- | css | Click Element `|` css=.green_button | Matches by css in webview | |
64
- | name | Click Element `|` name=my_element | Matches by @name attribute | *Only valid* for Selendroid |
65
-
66
- == Using webelements ==
67
-
68
- Starting with version 1.4 of the AppiumLibrary, one can pass an argument
69
- that contains a WebElement instead of a string locator. To get a WebElement,
70
- use the new `Get WebElements` or `Get WebElement` keyword.
71
-
72
- For example:
73
- | @{elements} Get Webelements class=UIAButton
74
- | Click Element @{elements}[2]
75
-
76
- """
77
-
78
- ROBOT_LIBRARY_SCOPE = 'GLOBAL'
79
- ROBOT_LIBRARY_VERSION = VERSION
80
-
81
- def __init__(self, timeout=5, run_on_failure='Appium Capture Page Screenshot', sleep_between_wait_loop=0.2):
82
- """AppiumLibrary can be imported with optional arguments.
83
-
84
- ``timeout`` is the default timeout used to wait for all waiting actions.
85
- It can be later set with `Set Appium Timeout`.
86
-
87
- ``run_on_failure`` specifies the name of a keyword (from any available
88
- libraries) to execute when a AppiumLibrary keyword fails.
89
-
90
- By default `Capture Page Screenshot` will be used to take a screenshot of the current page.
91
- Using the value `No Operation` will disable this feature altogether. See
92
- `Register Keyword To Run On Failure` keyword for more information about this
93
- functionality.
94
-
95
- ``sleep_between_wait_loop`` is the default sleep used to wait between loop in all wait until keywords
96
-
97
- Examples:
98
- | Library | AppiumLibrary | 10 | # Sets default timeout to 10 seconds |
99
- | Library | AppiumLibrary | timeout=10 | run_on_failure=No Operation | # Sets default timeout to 10 seconds and does nothing on failure |
100
- | Library | AppiumLibrary | timeout=10 | sleep_between_wait_loop=0.3 | # Sets default timeout to 10 seconds and sleep 300 ms between wait loop |
101
- """
102
- for base in AppiumLibrary.__bases__:
103
- base.__init__(self)
104
- self.set_appium_timeout(timeout)
105
- self.register_keyword_to_run_on_failure(run_on_failure)
106
- self.set_sleep_between_wait_loop(sleep_between_wait_loop)
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import os
4
+ from AppiumLibrary.keywords import *
5
+ from AppiumLibrary.version import VERSION
6
+
7
+ __version__ = VERSION
8
+
9
+
10
+ class AppiumLibrary(
11
+ _LoggingKeywords,
12
+ _RunOnFailureKeywords,
13
+ _ElementKeywords,
14
+ _WindowsKeywords,
15
+ _PowershellKeywords,
16
+ _ScreenshotKeywords,
17
+ _ApplicationManagementKeywords,
18
+ _WaitingKeywords,
19
+ _ScreenrecordKeywords
20
+ ):
21
+ """AppiumLibrary is a Mobile App testing library for Robot Framework.
22
+
23
+ = Locating or specifying elements =
24
+
25
+ All keywords in AppiumLibrary that need to find an element on the page
26
+ take an argument, either a ``locator`` or a ``webelement``. ``locator``
27
+ is a string that describes how to locate an element using a syntax
28
+ specifying different location strategies. ``webelement`` is a variable that
29
+ holds a WebElement instance, which is a representation of the element.
30
+
31
+ == Using locators ==
32
+
33
+ By default, when a locator is provided, it is matched against the key attributes
34
+ of the particular element type. For iOS and Android, key attribute is ``id`` for
35
+ all elements and locating elements is easy using just the ``id``. For example:
36
+
37
+ | Click Element id=my_element
38
+
39
+ New in AppiumLibrary 1.4, ``id`` and ``xpath`` are not required to be specified,
40
+ however ``xpath`` should start with ``//`` else just use ``xpath`` locator as explained below.
41
+
42
+ For example:
43
+
44
+ | Click Element my_element
45
+ | Wait Until Page Contains Element //*[@type="android.widget.EditText"]
46
+
47
+
48
+ Appium additionally supports some of the [https://w3c.github.io/webdriver/webdriver-spec.html|Mobile JSON Wire Protocol] locator strategies.
49
+ It is also possible to specify the approach AppiumLibrary should take
50
+ to find an element by specifying a lookup strategy with a locator
51
+ prefix. Supported strategies are:
52
+
53
+ | *Strategy* | *Example* | *Description* | *Note* |
54
+ | identifier | Click Element `|` identifier=my_element | Matches by @id attribute | |
55
+ | id | Click Element `|` id=my_element | Matches by @resource-id attribute | |
56
+ | accessibility_id | Click Element `|` accessibility_id=button3 | Accessibility options utilize. | |
57
+ | xpath | Click Element `|` xpath=//UIATableView/UIATableCell/UIAButton | Matches with arbitrary XPath | |
58
+ | class | Click Element `|` class=UIAPickerWheel | Matches by class | |
59
+ | android | Click Element `|` android=UiSelector().description('Apps') | Matches by Android UI Automator | |
60
+ | ios | Click Element `|` ios=.buttons().withName('Apps') | Matches by iOS UI Automation | |
61
+ | predicate | Click Element `|` predicate=name=="login" | Matches by iOS Predicate | Check PR: #196 |
62
+ | chain | Click Element `|` chain=XCUIElementTypeWindow[1]/* | Matches by iOS Class Chain | |
63
+ | css | Click Element `|` css=.green_button | Matches by css in webview | |
64
+ | name | Click Element `|` name=my_element | Matches by @name attribute | *Only valid* for Selendroid |
65
+
66
+ == Using webelements ==
67
+
68
+ Starting with version 1.4 of the AppiumLibrary, one can pass an argument
69
+ that contains a WebElement instead of a string locator. To get a WebElement,
70
+ use the new `Get WebElements` or `Get WebElement` keyword.
71
+
72
+ For example:
73
+ | @{elements} Get Webelements class=UIAButton
74
+ | Click Element @{elements}[2]
75
+
76
+ """
77
+
78
+ ROBOT_LIBRARY_SCOPE = 'GLOBAL'
79
+ ROBOT_LIBRARY_VERSION = VERSION
80
+
81
+ def __init__(self, timeout=10, run_on_failure='Appium Capture Page Screenshot', sleep_between_wait_loop=1):
82
+ """AppiumLibrary can be imported with optional arguments.
83
+
84
+ ``timeout`` is the default timeout used to wait for all waiting actions.
85
+ It can be later set with `Set Appium Timeout`.
86
+
87
+ ``run_on_failure`` specifies the name of a keyword (from any available
88
+ libraries) to execute when a AppiumLibrary keyword fails.
89
+
90
+ By default `Capture Page Screenshot` will be used to take a screenshot of the current page.
91
+ Using the value `No Operation` will disable this feature altogether. See
92
+ `Register Keyword To Run On Failure` keyword for more information about this
93
+ functionality.
94
+
95
+ ``sleep_between_wait_loop`` is the default sleep used to wait between loop in all wait until keywords
96
+
97
+ Examples:
98
+ | Library | AppiumLibrary | 10 | # Sets default timeout to 10 seconds |
99
+ | Library | AppiumLibrary | timeout=10 | run_on_failure=No Operation | # Sets default timeout to 10 seconds and does nothing on failure |
100
+ | Library | AppiumLibrary | timeout=10 | sleep_between_wait_loop=0.3 | # Sets default timeout to 10 seconds and sleep 300 ms between wait loop |
101
+ """
102
+ for base in AppiumLibrary.__bases__:
103
+ base.__init__(self)
104
+ self.set_appium_timeout(timeout)
105
+ self.register_keyword_to_run_on_failure(run_on_failure)
106
+ self.set_sleep_between_wait_loop(sleep_between_wait_loop)
@@ -1,10 +1,11 @@
1
- import os
2
- import sys
3
-
4
- PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
5
- if PROJECT_ROOT not in sys.path:
6
- sys.path.append(PROJECT_ROOT)
7
-
8
- def get_version():
9
- from AppiumLibrary.version import VERSION
1
+ import os
2
+ import sys
3
+
4
+ PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
5
+ if PROJECT_ROOT not in sys.path:
6
+ sys.path.append(PROJECT_ROOT)
7
+ del PROJECT_ROOT
8
+
9
+ def get_version():
10
+ from AppiumLibrary.version import VERSION
10
11
  return VERSION
@@ -1,21 +1,21 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from ._applicationmanagement import _ApplicationManagementKeywords
4
- from ._element import _ElementKeywords
5
- from ._logging import _LoggingKeywords
6
- from ._powershell import _PowershellKeywords
7
- from ._runonfailure import _RunOnFailureKeywords
8
- from ._screenrecord import _ScreenrecordKeywords
9
- from ._screenshot import _ScreenshotKeywords
10
- from ._waiting import _WaitingKeywords
11
- from ._windows import _WindowsKeywords
12
-
13
- __all__ = ["_LoggingKeywords",
14
- "_RunOnFailureKeywords",
15
- "_ElementKeywords",
16
- "_PowershellKeywords",
17
- "_WindowsKeywords",
18
- "_ScreenshotKeywords",
19
- "_ApplicationManagementKeywords",
20
- "_WaitingKeywords",
21
- "_ScreenrecordKeywords"]
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from ._applicationmanagement import _ApplicationManagementKeywords
4
+ from ._element import _ElementKeywords
5
+ from ._logging import _LoggingKeywords
6
+ from ._powershell import _PowershellKeywords
7
+ from ._runonfailure import _RunOnFailureKeywords
8
+ from ._screenrecord import _ScreenrecordKeywords
9
+ from ._screenshot import _ScreenshotKeywords
10
+ from ._waiting import _WaitingKeywords
11
+ from ._windows import _WindowsKeywords
12
+
13
+ __all__ = ["_LoggingKeywords",
14
+ "_RunOnFailureKeywords",
15
+ "_ElementKeywords",
16
+ "_PowershellKeywords",
17
+ "_WindowsKeywords",
18
+ "_ScreenshotKeywords",
19
+ "_ApplicationManagementKeywords",
20
+ "_WaitingKeywords",
21
+ "_ScreenrecordKeywords"]