-
Notifications
You must be signed in to change notification settings - Fork 38
/
s.py
22 lines (19 loc) · 806 Bytes
/
s.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- coding: utf-8 -*-
__author__ = 'Mio4kon'
from appium import webdriver
from base.action import ElementActions
from utils.environment import Environment
env = Environment().get_environment_info()
capabilities = {'platformName': env.devices[0].platform_name,
'platformVersion': env.devices[0].platform_version,
'deviceName': env.devices[0].device_name,
'app': env.apk,
'clearSystemFiles': True,
'appActivity': env.app_activity,
'appPackage': env.app_package,
'automationName': 'UIAutomator2',
'noSign': True,
'newCommandTimeout': 60 * 100}
host = "http://localhost:4723/wd/hub"
driver = webdriver.Remote(host, capabilities)
action = ElementActions(driver)