我用python编写了一个单元测试用例,用于自动化我的应用程序的登录屏幕。我在用Appium。我在下面的一行中出错了。我已经设置了所需的功能。你知道吗
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '6.0.1'
desired_caps['deviceName'] = 'Redmi 3S'
desired_caps['app'] = '/Users/sanju/Desktop/myapp.apk'
class Utils(object) :
@staticmethod
def initialswipes(driver):
for _ in range(0, 5):
try :
driver.execute_script("mobile: swipe", {"direction": "left"})
except WebDriverException :
return False
return True
class MyTestCase(unittest.TestCase):
def test_something(self):
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
错误是: 文件“/Users/sanju/PycharmProjects/Android/登录.py“,第37行,在测试中” 驱动程序=webdriver.远程('http://localhost:4723/wd/hub',所需的\u大写)
目前没有回答
相关问题 更多 >
编程相关推荐