当前位置:网站首页>Selenium: browser operation
Selenium: browser operation
2022-08-01 05:10:00 【Mouse A who is not afraid of cats】
Selenium browser operation
1. As mentioned earlier, a browser WebDriver object can be instantiated according to the WebDriver class under Selenium: return the WebDriver object
2. Opening a specified webpage and locating the specified element in the HTML document are all implemented according to the method of the browser WebDriver object
⑴Open a specified webpage: WebDriver object.get()
⑵Element positioning:
①WebDriver object.find_element_by_*()
②WebDriver object.find_element()
③WebDriver object.find_elements_by_*()
④WebDriver object.find_elements()
3. There are not only the methods mentioned above, but also other methods and properties under the browser WebDriver object.Therefore, other methods or properties of the browser WebDriver object are mainly introduced here.The methods and properties of the WebElement object will be introduced later:
of the manipulation elementGet browser name
1. The name of the currently used browser can be obtained through the name attribute under the WebDriver object
Example 1:
from selenium import webdriver# Get the browser objectdriver = webdriver.Chrome()# Enter Baidu homepagedriver.get('https://www.baidu.com/')# Get the current browser namename = driver.nameprint(name)#chrome边栏推荐
- MySQL-Data Operation-Group Query-Join Query-Subquery-Pagination Query-Joint Query
- (2022 Nioke Duo School IV) D-Jobs (Easy Version) (3D prefix or)
- Challenge 52 days to memorize Peppa Pig (Day 01)
- 这里有110+公开的专业数据集
- HJS-DE1/2时间继电器
- Robot_Framework:断言
- (2022牛客多校四)N-Particle Arts(思维)
- typescript20-接口
- 图片更新之后Glide加载依旧是原来的图片问题
- 可持久化线段树
猜你喜欢

pytorch、tensorflow对比学习—功能组件(激活函数、模型层、损失函数)

SL-12/2过流继电器

MySQL-Data Operation-Group Query-Join Query-Subquery-Pagination Query-Joint Query

万字逐行解析与实现Transformer,并进行德译英实战(一)

7 行代码搞崩溃 B 站,原因令人唏嘘!

typescript23-tuple

(2022 Nioke Duo School IV) H-Wall Builder II (Thinking)

UE4 从鼠标位置射出射线检测

【目标检测】YOLOv7理论简介+实践测试

pytroch、tensorflow对比学习—搭建模型范式(构建模型方法、训练模型范式)
随机推荐
y83.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十四)
The difference between scheduleWithFixedDelay and scheduleAtFixedRate
Selenium:简介
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
typescript27-枚举类型呢
typescript23-元组
mysql中解决存储过程表名通过变量传递的方法
Selenium:表单切换
数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》
pytroch、tensorflow对比学习—搭建模型范式(低阶、中阶、高阶API示例)
干货!如何使用仪表构造SRv6-TE性能测试环境
MySQL-数据操作-分组查询-连接查询-子查询-分页查询-联合查询
typescript25-类型断言
Power button (LeetCode) 212. The word search II (2022.07.31)
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
Selenium:元素等待
Selenium:元素判断
7月编程排行榜来啦!这次有何新变化?
High Numbers | 【Re-integration】Line Area Score 880 Examples
图片更新之后Glide加载依旧是原来的图片问题