Appium和Selenium完成自动化测试

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mo_feng_/article/details/82982698

Appium可以实现App的自动化测试,Selenium可以实现Web自动化测试

Selenium例子先用python开发
Selenium地址
https://www.seleniumhq.org/download/
1,首先下载驱动地址,如下。将驱动下载完放入到浏览器安装路径,再讲安装路径放入Path中(注意驱动版本和浏览器版本对应)。
Drivers下载地址
https://seleniumhq.github.io/selenium/docs/api/py/index.html
2,编写Python代码,如下

from selenium import webdriver

import time

driver = webdriver.Chrome()
# driver = webdriver.Firefox()
driver.get("https://www.baidu.com")
time.sleep(3)

driver.find_element_by_id("kw").send_keys("搜索")

time.sleep(2)

driver.find_element_by_id("su").click()

Appium的例子之后再完善,如果有需要的可以私信联系我

猜你喜欢

转载自blog.csdn.net/mo_feng_/article/details/82982698