当前位置:网站首页>Selenium element positioning
Selenium element positioning
2022-06-12 17:02:00 【Clear tears】
Common positioning methods :
web.find_element(By.ID, 's-top-left') # Elements id location
web.find_element(By.CLASS_NAME,'mnav') # Class selector positioning
web.find_element(By.TAG_NAME, 'a') # Element label positioning
web.find_element(By.NAME,'description') # name Attribute selector
web.find_element(By.LINK_TEXT,' Journalism ') # Select... Through text connection
web.find_element(By.PARTIAL_LINK_TEXT, ' new ') # Select... Through partial text connection
web.find_elements(By.XPATH, '//*[@id="s-top-left"]/a') # xpath Selectors
web.find_element(By.CSS_SELECTOR,'#s-top-left>a') # css Selector positioning recommend By.CSS_SELECTOR

边栏推荐
猜你喜欢

Unit sshd. service could not be found

D. master router setting and 401 networking

初识GO语言

SwinTransformer网络架构

Modify the configuration of the router connected to your computer. The website is 192.168.1.1

快速入门scrapy爬虫框架

Programmers broke the news: 3 job hopping in 4 years, and the salary has tripled! Netizen: the fist is hard

CVPR 2022 | 元学习在图像回归任务的表现

Leetcode 2190. The number that appears most frequently in the array immediately after the key (yes, once)

Google浏览器调试技巧
随机推荐
怎么在公司里面做好测试工作(做好测试工作)
写技术博客的意义
(七)循环语句for
Swin transformer code explanation
Canvas advanced functions (Part 2)
多种Qt的开发方式,你选择哪种?
有趣的 LD_PRELOAD
薛定谔的日语学习小程序源码
Pat class a 1142 largest regiment
ShardingJDBC 分库分表详解
PAT甲级 1139 第一次接触
\begin{algorithm} 笔记
SwinTransformer网络架构
Leetcode 2190. 数组中紧跟 key 之后出现最频繁的数字(可以,一次过)
C # final review programming question (guessed by the teacher)
Add static route
The safety of link 01 was questioned, and "ultra high strength" became "high strength"_ Publicity_ Steel_ problem
MySQL事务简介、事务隔离级别
Where is it safer to open an account for thermal coal futures? How much is the thermal coal futures deposit?
[BSP video tutorial] stm32h7 video tutorial Issue 8: the last issue of the MDK theme, the new generation of debugging technologies event recorder and RTT, and using stm32cubemx to generate project tem