Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/driver/appium-androi…
Browse files Browse the repository at this point in the history
…d-driver-7.0.2
  • Loading branch information
KazuCocoa authored Oct 19, 2023
2 parents 4354570 + 1232e1c commit 862554a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Legend:
### Commands

The below _WebDriver example_ is by webdriverio.
`flutter:` prefix commands are [`mobile:` command in appium for Android and iOS](https://appium.io/docs/en/commands/mobile-command/).
`flutter:` prefix commands are [`mobile:` command in appium for Android and iOS](https://appium.io/docs/en/latest/guides/execute-methods/).
Please replace them properly with your client.

| Flutter API | Status | WebDriver example (JavaScript, webdriverio) | Scope |
Expand Down
2 changes: 1 addition & 1 deletion example/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"dependencies": {
"appium-flutter-finder": "^0.1.0",
"appium-flutter-finder": "^0.2.0",
"webdriverio": "^8.0.5"
},
"scripts": {
Expand Down
23 changes: 15 additions & 8 deletions example/python/example.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
import os

from appium.webdriver import Remote

# from appium.options.common.base import AppiumOptions
# AppiumOptions also can be used, but this may not have iOS specific commands.
from appium.options.ios.xcuitest.base import XCUITestOptions
from appium_flutter_finder.flutter_finder import FlutterElement, FlutterFinder

# Example

driver = Remote('http://localhost:4723/wd/hub', dict(
platformName='iOS',
automationName='flutter',
platformVersion='15.0',
deviceName='iPhone 8',
app='{}/../app/app/Runner.zip'.format(
os.path.dirname(os.path.realpath(__file__)))
))
options = XCUITestOptions()
options.automation_name = 'flutter'
options.platform_name = 'ios'
options.set_capability('platformVersion', '17.0')
options.set_capability('deviceName', 'iPhone 15')
options.set_capability('app', f'{os.path.dirname(os.path.realpath(__file__))}/../sample2/IOSFullScreen.zip')

driver = Remote('http://localhost:4723', options=options)

driver.quit()

# below tests are different from the 'IOSFullScreen.zip'
finder = FlutterFinder()

text_finder = finder.by_text('You have pushed the button this many times:')
Expand Down
3 changes: 2 additions & 1 deletion example/python/requirement.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Appium-Flutter-Finder ~= 0.4.0
Appium-Flutter-Finder ~= 0.6.0
Appium-Python-Client ~= 3.1.0

0 comments on commit 862554a

Please sign in to comment.