selenium-1 使用selenium中的webdriver模块

发布时间:2020-08-03 19:51:23 作者:pp小白
来源:网络 阅读:688

使用selenium中的webdriver模块对浏览器进行操作
1)b = webdriver.Firefox() #打开浏览器
2)b.get("http://www.baidu.com") #打开一个网页
3)b.title,current_url 判断访问是否有效
4)ele = find_element_by_id/name() #定位元素
5)ele.clear() ele.send_keys(arg) #清空/输入值
6)b.back() #回到上一页
7)b.find_element_by_link_text()
8)ele1 = b.find_element_by_partial_link_text("软件测试") #模糊定位元素
9)b.find_element_by_css_selector() #复制css路径定位元素

selenium-1  使用selenium中的webdriver模块

selenium-1  使用selenium中的webdriver模块

推荐阅读:
  1. Python+selenium+unittest的GUI自动化框架实现
  2. 使用Python+Selenium如何实现搭建自动化环境

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

selenium sel ebd

上一篇:Smobiler控件的使用:ListView的数据绑定及实现多选

下一篇:MySQL 5.7及8.0版本数据库的root密码遗忘的解决

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》