Skip to content

Commit a9af896

Browse files
authored
fix: typo and update test (#992)
* docs: fix typo * fix more typos * test: fix one test
1 parent 850055d commit a9af896

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ For example, some changes in the Selenium binding could break the Appium client.
7272
### Quick migration guide from v2 to v3
7373
- `options` keyword argument in the `webdriver.Remote` constructor such as `XCUITestOptions` instead of `desired_capabilities`
7474
- Available options are https://github.com/appium/python-client/tree/master/appium/options
75-
- Please check the [Usage](#usage) below as an exampple.
75+
- Please check the [Usage](#usage) below as an example.
7676
- Not a "new" change, but the `desired_capabilities` argument has been removed since v3.
7777
- Replacement
7878
- `start_activity` method: Please use [`mobile: startActivity`](https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-startactivity)

appium/webdriver/webdriver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def add_command(self):
126126
driver.custom_method_name({'dummy_arg': 'as a value'})
127127
128128
129-
When you customize the URL dinamically with element id.
129+
When you customize the URL dynamically with element id.
130130
131131
class CustomURLCommand(ExtensionBase):
132132
def method_name(self):
@@ -140,7 +140,7 @@ def add_command(self):
140140
141141
driver = webdriver.Remote('http://localhost:4723/wd/hub', options=options,
142142
extensions=[YourCustomCommand])
143-
element = driver.find_elemeent(by=AppiumBy.ACCESSIBILITY_ID, value='id')
143+
element = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='id')
144144
145145
# Then, the driver calls a get request to `session/$sessionId/path/to/your/custom/$id/url`
146146
# with replacing the `$id` with the given `element.id`

test/functional/android/search_context/find_by_image_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def test_find_based_on_image_template(self) -> None:
6262
def test_find_multiple_elements_by_image_just_returns_one(self) -> None:
6363
wait_for_element(self.driver, AppiumBy.ACCESSIBILITY_ID, 'App')
6464
image_path = desired_capabilities.PATH('file/find_by_image_success.png')
65-
els = self.driver.find_elements_by_image(image_path)
65+
with open(image_path, 'rb') as png_file:
66+
b64_data = base64.b64encode(png_file.read()).decode('UTF-8')
67+
els = self.driver.find_elements(AppiumBy.IMAGE, b64_data)
6668
els[0].click()
6769
wait_for_element(self.driver, AppiumBy.ACCESSIBILITY_ID, 'Alarm')
6870

0 commit comments

Comments
 (0)