mirror of
https://github.com/appium/appium.git
synced 2026-01-21 09:39:52 -06:00
Make python examples runnable from anywhere (not just from script dir).
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import os
|
||||
from selenium import webdriver
|
||||
|
||||
# Returns abs path relative to this file and not cwd
|
||||
PATH = lambda p: os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), p)
|
||||
)
|
||||
|
||||
desired_caps = {}
|
||||
desired_caps['device'] = 'Android'
|
||||
desired_caps['browserName'] = ''
|
||||
desired_caps['version'] = '4.2'
|
||||
desired_caps['app'] = os.path.abspath('../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk')
|
||||
desired_caps['app'] = PATH('../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk')
|
||||
desired_caps['app-package'] = 'com.example.android.apis'
|
||||
desired_caps['app-activity'] = 'ApiDemos'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user