-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMyDriver.py
More file actions
27 lines (22 loc) · 1.05 KB
/
Copy pathMyDriver.py
File metadata and controls
27 lines (22 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# coding=utf-8
from appium import webdriver
class MyDriver:
def __init__(self, port, appPackage, activityName):
self.__port = port
self.__baseUrl = "http://localhost:"+self.__port+"/wd/hub"
self.__desired_caps = {
"platformName": "Android",
"platformVersion": "4.4.4",
"deviceName": "nox",
#"udid": udid,
"newCommandTimeout": "15",
"unicodeKeyboard": "True",
"resetKeyboard": "True",
"noSign": "True",
"appPackage": appPackage,
"appActivity": activityName
}
def driver(self):
return webdriver.Remote(self.__baseUrl, self.__desired_caps)
nox = MyDriver("4723", "com.longtu.weifuhua", "com.longtu.weifuhua.ui.personcenter.activity.PersonalLoadingActivity")
nox1 = MyDriver("4725", "com.longtu.weifuhua", "com.longtu.weifuhua.ui.personcenter.activity.PersonalLoadingActivity")