Skip to content

Commit

Permalink
py: use newer python as an example (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa authored Oct 18, 2023
1 parent 1e47828 commit 4b3bead
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
21 changes: 13 additions & 8 deletions example/python/example.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import os

from appium.webdriver import Remote

from appium.options.common.base import AppiumOptions
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 = AppiumOptions()
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 4b3bead

Please sign in to comment.