当前位置:网站首页>selenium4.0以上元素被定位
selenium4.0以上元素被定位
2022-08-06 07:57:10【范之度】
selenium在4.0之后find_element_by_xpath()被弃用,因此新的句式去定位元素,
Chrome.find_element_by_xpath('//*[@id="s-top-loginbtn"]').click()#点击登录按钮
举例如下:
browser.find_element(By.XPATH,'/html/body/div[1]/div[1]/header/div/div[3]/div[1]/span[1]').click()
flag = wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="TANGRAM__PSP_11__userName"]')))
边栏推荐
- How to limit command length to bounce shell
- Datax3.0+DataX-Web builds distributed visual ETL system
- Original Questions for Level 5 of China Electronics Society Youth Grade Examination
- [Cloud Native--Kubernetes] Configuration Management
- Use Specification and Example to implement dynamic conditional query cases
- JMeter集合点
- JMeter关联执行
- JMeter代理录制手机app
- The origin of the name, concave language -, and moral
- [面试篇]Mysql 索引 BTree 与 B+Tree 的区别
猜你喜欢
I set the global mapping table prefix in yml, but the database does not recognize it
Simulate the realization of strcpy function (including multiple optimization ideas)
Script for reverse generation of entity class, query and other interface xml of MySQL database
快速学会文件操作模块
js simulates the function of dynamically deleting messages
How to improve the quality of articles without being "recommended and affected" by the post assistant
CSDN official plug-in
C语言 结构体
【leetcode】8. 字符串转换整数 (atoi)
"Digital reconstruction system, CEO is the first step"
随机推荐
- how to jump higher
- No, no, no, it's 2022, you don't know the principle of Jmeter, right?
- 测试用例设计方法-场景法详解
- 一文3000字解析Pytest单元测试框架【保姆级教程】
- 2022-08-05:以下go语言代码输出什么?A:65, string;B:A, string;C:65, int;D:报错。
- Jetpack WorkManager 看这一篇就够了~
- 关于np.zeros()第三个参数:c代表与c语言类似,行优先;F代表列优先的记录
- 腾讯云点播上传视频文件解决路径问题
- Parameter ‘courseId‘ not found. Available parameters are [arg1, arg0, param1, para
- LeetCode——345. 反转字符串中的元音字母
- LeetCode——1047. 删除字符串中的所有相邻重复项
- 山石发声 | 做好安全运营,没有你想象的那么难
- bpe 中文tokens
- dalle2:hierarchical text-conditional image generation with clip
- qwqの科技flag
- 2022海亮SC游记
- 20220803模拟
- 代码签名证书可以解决软件被杀毒软件报毒提醒吗?
- 使用aggird组件实现下滑请求分页从而实现无限滚动的效果
- 代码签名证书多少钱?
- yum离线安装
- 禁止运行游戏的程序开发
- QianBase 运维实用命令
- EsgynDB Troubleshooting - 网卡MTU导致跨网段访问数据库失败
- 按钮只能点击一次
- errorCode 1045, state 28000错误详解即解决方法
- UNIX environment advanced programming - the first chapter
- Advanced Programming in UNIX Environment - Chapter 2
- CPU Architecture at a Glance
- QianBase Operation and Maintenance Practical Commands
- About the third parameter of np.zeros(): c represents similar to c language, row priority; F represents column priority record
- Use the aggird component to implement sliding request paging to achieve the effect of infinite scrolling
- Test case design method - detailed explanation of scenario method
- Program development that runs the game is prohibited
- ErrorCode 1045, the state 28000 error, rounding the solution
- Can the code signing certificate solve the software being alerted by antivirus software?
- yum offline installation
- How much is a code signing certificate?
- Jetpack WorkManager is enough to read this article~
- Button can only be clicked once