Skip to content

Commit b4f6bb3

Browse files
authored
Merge branch 'serhatbolsu:master' into performance-optimization-tap-loop-16219237186636556862
2 parents b5fa16d + 9098b9e commit b4f6bb3

4 files changed

Lines changed: 436 additions & 2 deletions

File tree

.github/workflows/unit-tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Mock Unit Tests
2+
3+
on:
4+
push:
5+
branches: [ "master", "main"]
6+
pull_request:
7+
branches: [ "master", "main"]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ "3.10", "3.11" ]
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install Dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
# Added 'pytest-cov' to fix the error
29+
pip install pytest mock pytest-cov
30+
31+
# Install the library itself
32+
pip install .
33+
34+
if [ -f utest/requirements.txt ]; then pip install -r utest/requirements.txt; fi
35+
36+
- name: Run Mock Tests
37+
run: |
38+
# -v gives verbose output so you can see exactly which tests pass/fail
39+
pytest -v tests/

CONTRIBUTING.rst

Lines changed: 336 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,336 @@
1+
**Contribution Guidelines**
2+
===============================
3+
4+
Our Philosophy
5+
-----------------
6+
7+
AppiumLibrary is a community-driven project. We believe in open collaboration,
8+
quality over quantity, and maintaining a library that is easy to use for both
9+
beginners and experts. Our goal is to provide reliable, well-documented keywords
10+
that work seamlessly across iOS and Android platforms.
11+
12+
13+
.. contents::
14+
15+
16+
**Ways to Contribute**
17+
-----------------------
18+
19+
20+
1. Help Answer Questions
21+
~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+
Participate in discussions and help users with any issues they are encountering:
24+
25+
- Join the `Robot Framework Slack`_ and help out in the ``#appiumlibrary`` channel
26+
27+
- Answer questions in the `Robot Framework Forum`_
28+
29+
- Share your knowledge and experience with the community
30+
31+
32+
2. Report Issues
33+
~~~~~~~~~~~~~~~~~~~~~~~~~
34+
35+
36+
**Submitting Bug Reports:**
37+
38+
If you find any bugs or unexpected behavior, we encourage you to submit an issue.
39+
Please follow the `Bug Report Guideline`_ below.
40+
41+
42+
**Feature Requests:**
43+
44+
If you have an idea for a feature you'd like to see, feel free to submit a
45+
feature request as a GitHub issue. Please describe your use case and how the
46+
feature would benefit the community. We'll discuss it with you before any
47+
work begins.
48+
49+
50+
**Reproducing Existing Issues:**
51+
52+
If an issue has already been reported, try to reproduce it and provide
53+
additional information if possible. Your help in confirming issues is valuable!
54+
55+
56+
57+
3. Contribute Code
58+
~~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
Fork the project, make a change, and send a pull request! See the
61+
`Development Setup`_ and `Submitting Issues`_ sections below.
62+
63+
64+
4. Improve Documentation
65+
~~~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
Help us improve the documentation by fixing typos, adding examples, or
68+
clarifying existing content. Documentation contributions are just as
69+
valuable as code contributions!
70+
71+
72+
Submitting Issues
73+
-----------------------
74+
75+
**How to Create Issues**
76+
77+
**Is it a bug?**
78+
79+
- If you think you've encountered a bug, check the `existing issues`_ to see
80+
if it's already reported. If you can't find it, feel free to create a new issue.
81+
82+
- If you're unsure whether it is a bug, you can ask in Slack or Forum first
83+
to see if others are encountering the same issue or if it's something we
84+
are already working on.
85+
86+
87+
**Feature requests:**
88+
89+
90+
If you have an idea for a new feature or enhancement:
91+
92+
93+
1. Check the `existing issues`_ to see if someone has already suggested it.
94+
2. If not, create a new issue with the label "enhancement".
95+
3. Describe the feature, your use case, and how it would benefit users.
96+
4. Be prepared to discuss the implementation approach with maintainers.
97+
98+
We appreciate well-thought-out feature requests that include example usage
99+
and consider both iOS and Android platforms where applicable.
100+
101+
102+
Bug Report Guideline
103+
-----------------------
104+
105+
106+
When submitting a bug report, please include as much information as possible
107+
to help us reproduce and fix the issue. This includes:
108+
109+
- **Python version** (e.g., 3.11.4)
110+
111+
- **Appium version** (e.g., 2.5.1)
112+
113+
- **Appium Python Client version** (e.g., 5.1.1)
114+
115+
- **AppiumLibrary version** (e.g., 3.1)
116+
117+
- **Platform** (iOS or Android) and version (e.g., Android 14, iOS 17.2)
118+
119+
- **Driver and its version** (e.g., UIAutomator2 2.34.1, XCUITest 5.12.0)
120+
121+
- **Simulator or real device**
122+
123+
- **Device information** (model of the device you're testing on)
124+
125+
- **Steps to reproduce** (minimal test case if possible)
126+
127+
- **Error messages** (full stack trace)
128+
129+
- **Expected vs. actual behavior**
130+
131+
132+
Example bug report::
133+
134+
135+
**Environment:**
136+
137+
- Python: 3.11.4
138+
139+
- Appium Server: 2.5.1
140+
141+
- Appium Python Client: 5.1.1
142+
143+
- AppiumLibrary: 3.1
144+
145+
- Platform: Android 14
146+
147+
- Driver: UIAutomator2 2.34.1
148+
149+
- Device: Pixel 7 (emulator)
150+
151+
152+
**Keyword:**
153+
154+
`Open Application`
155+
156+
157+
**Description:**
158+
159+
The keyword does not correctly process capabilities with the `appium:`
160+
prefix. When passing capabilities like `appium:automationName`, they
161+
are not properly forwarded to the Appium server.
162+
163+
164+
**Steps to Reproduce:**
165+
166+
1. Call `Open Application` with W3C-style capabilities using the
167+
`appium:` prefix
168+
169+
2. Observe that the capability is either ignored or causes an error
170+
171+
**Expected Result:**
172+
173+
Capabilities with `appium:` prefix should be correctly passed to the
174+
Appium server and the session should start successfully.
175+
176+
177+
178+
**Actual Result:**
179+
180+
The capability is not recognized, resulting in a session creation failure.
181+
182+
**Error Message:**
183+
184+
```
185+
186+
WebDriverException: Could not create session.
187+
188+
Required capability 'automationName' not found.
189+
190+
```
191+
192+
193+
**Minimal Example:**
194+
195+
```robotframework
196+
197+
*** Test Cases ***
198+
199+
Example
200+
201+
Open Application http://127.0.0.1:4723
202+
203+
... platformName=Android
204+
205+
... appium:automationName=UIAutomator2
206+
207+
... appium:app=/path/to/app.apk
208+
209+
```
210+
211+
212+
.. warning::
213+
214+
**Before you submit:**
215+
216+
Please remember that all information you submit will be **public**.
217+
Do **NOT** include any private or confidential information as this is a public repository.
218+
219+
220+
Contributing Code
221+
-----------------------
222+
223+
Keyword Documentation
224+
~~~~~~~~~~~~~~~~~~~~~~~
225+
226+
All public keywords must have docstrings. When adding new keywords:
227+
228+
- First paragraph is a brief description
229+
- Document all arguments with their types and default values
230+
- Add examples showing common usage
231+
- Note any platform-specific behavior (iOS vs Android)
232+
233+
234+
235+
Example::
236+
237+
238+
239+
def click_element(self, locator, modifier=False):
240+
241+
"""Click element identified by ``locator``.
242+
243+
244+
245+
Key attributes for arbitrary elements are ``id`` and ``name``.
246+
247+
248+
249+
If ``modifier`` is set to ``True``, the element will be
250+
251+
clicked with a long press gesture.
252+
253+
254+
255+
Examples:
256+
257+
| Click Element | id=button_submit |
258+
259+
| Click Element | xpath=//android.widget.Button[@text='OK'] |
260+
261+
262+
263+
See also `Click Button`, `Click Text`, and `Long Press`.
264+
265+
"""
266+
267+
pass
268+
269+
270+
271+
Generating Documentation
272+
~~~~~~~~~~~~~~~~~~~~~~~
273+
274+
To regenerate the keyword documentation::
275+
276+
277+
python -m robot.libdoc ./AppiumLibrary/ ./docs/AppiumLibrary.html
278+
279+
280+
Submitting Changes
281+
~~~~~~~~~~~~~~~~~~~~~~~
282+
283+
284+
1. **Create a new branch** for your feature or bugfix::
285+
286+
287+
288+
git checkout -b my-feature-branch
289+
290+
291+
292+
2. **Make your changes** and commit them with clear messages
293+
294+
295+
296+
3. **Push your branch** to your fork::
297+
298+
299+
300+
git push origin my-feature-branch
301+
302+
303+
304+
4. **Open a pull request** against the main repository
305+
306+
307+
308+
5. **Ensure CI checks pass** and address any review feedback
309+
310+
311+
312+
For questions or discussions, feel free to open an issue on GitHub or
313+
314+
reach out on Slack.
315+
316+
317+
318+
Project Contributors
319+
-----------------------
320+
321+
322+
323+
See the `README`_ for the full list of project contributors.
324+
325+
We appreciate all contributions, big and small! Contributors will be
326+
acknowledged in the release notes.
327+
328+
329+
330+
Thank you for helping make AppiumLibrary better!
331+
332+
.. _Robot Framework Slack: https://robotframework.slack.com/
333+
.. _Robot Framework Forum: https://forum.robotframework.org/c/libraries/appium/37
334+
.. _Development Setup: https://github.com/serhatbolsu/robotframework-appiumlibrary?tab=readme-ov-file#contributing
335+
.. _existing issues: https://github.com/serhatbolsu/robotframework-appiumlibrary/issues
336+
.. _README: https://github.com/serhatbolsu/robotframework-appiumlibrary/blob/master/README.rst

0 commit comments

Comments
 (0)