首页 > 移动平台 > 详细

Appium_iOS测试脚本(1)

时间:2020-03-21 13:35:03      阅读:61      评论:0      收藏:0      [点我收藏+]

 经过不断的调试WebDriverAgent, 现在终于可以执行ios的自动化测试脚本了,??????

# This sample code uses the Appium python client
# pip install Appium-Python-Client
# Then you can paste this into a file and simply run with Python

from appium import webdriver

caps = {}
caps["browserName"] = "Safari"
caps["deviceName"] = "iPhone 11 Pro Max"
caps["platformName"] = "iOS"
caps["platformVersion"] = "13.3"
caps["udid"] = "CD7A3E92-9C32-4428-9765-CF99FE142233"
caps["automationName"] = "xcuitest"

driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)

driver.get("https://www.baidu.com"
)

el2 = driver.find_element_by_xpath("//XCUIElementTypeOther[@name=\"百度一下\"]/XCUIElementTypeOther[12]")
el2.click()

driver.quit()

 

Appium_iOS测试脚本(1)

原文:https://www.cnblogs.com/jiguanghover/p/12538537.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!