关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
Zina_zq
2022-07-04 11:27
采纳率: 33.3%
浏览 8290
首页
编程语言
已结题
python+selenium报错AttributeError: 'WebDriver' object has no attribute 'find_element_by_id'
python
selenium
代码如下
报错如下信息
“WebDriver”对象没有属性“find_element_by_id”,但是不知道如何解决
收起
写回答
好问题
0
提建议
关注问题
微信扫一扫
点击复制链接
分享
邀请回答
编辑
收藏
删除
收藏
举报
3
条回答
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
weixin_48484941
2022-07-04 14:32
关注
driver.find_element(By.ID, 'kw').sendkeys('搜索')
本回答被题主选为最佳回答
, 对您是否有帮助呢?
本回答被专家选为最佳回答
, 对您是否有帮助呢?
本回答被题主和专家选为最佳回答
, 对您是否有帮助呢?
解决
21
无用
7
评论
打赏
微信扫一扫
点击复制链接
分享
举报
评论
按下Enter换行,Ctrl+Enter发表内容
查看更多回答(2条)
向“C知道”追问
报告相同问题?
提交
关注问题
selenium
报错
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘
2023-09-08 15:53
rubyw的博客
AttributeError
: ‘
WebDriver
’
object
has no
attribute
‘find_
element
_by_
id
’” 错误通常出现在使用
Selenium
WebDriver
时,代码中使用了 ‘find_
element
_by_
id
’ 方法,但
WebDriver
对象并没有这个方法。...
完美解决:
python
selenium
报错
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘
2023-09-16 20:41
w-1227的博客
完美解决:
python
selenium
报错
AttributeError
: ‘
WebDriver
’
object
has no
attribute
‘find_
element
_by_
id
’ 代码如下
报错
如下: 解决方式
selenium
版本更新:find_
element
() 版本更新了,现在的写法为: ...
python
selenium
报错
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘
2023-02-21 19:17
streetrust的博客
selenium
报错
python
selenium
报错
:
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘
2022-12-22 10:52
啾啾景的博客
代码如下:
报错
AttributeError
: '
WebDriver
'
object
has no
attribute
'find_
element
_by_
id
'
报错
原因:版本更新,写法稍稍变动 更改方法: 备注: 本人
selenium
版本为4.7.2 如果此方法不好使,那就是又更新辽~ 我...
python
Selenium
使用
报错
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_xpath‘
2022-11-16 16:48
楓尘林间的博客
参考 问题定位 根本问题是 本机的
Selenium
包将方法给移除了 最新版的方法对应旧版: 解决方法 1、本机包降版本直接使用源代码(适合代码量大且复杂的) pip install
selenium
==4.2.0 --force-reinstall 2、方法修改...
python
selenium
定位元素
报错
:‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
2023-03-08 15:49
Moniko_yo的博客
报错
关于新版本
selenium
定位元素
报错
:‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘等问题
2022-08-08 22:01
热爱学习的猪的博客
运行
Selenium
出现'
WebDriver
'
object
has no
attribute
'find_
element
_by_
id
'或
AttributeError
: '
WebDriver
'
object
has no
attribute
'find_
element
_by_xpath'等定位元素代码错误,是因为
selenium
更新到了新的版本...
Selenium
问题解决记录:
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_
id
‘
2024-03-03 14:23
艳Yansky的博客
AttributeError
: '
WebDriver
'
object
has no
attribute
'find_
element
_by_
id
'解决方案
【
selenium
报错
】
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_link_text‘
2024-01-16 10:41
泽灯的博客
【代码】【
selenium
报错
】
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_link_text
selenium
库
报错
:
AttributeError
: ‘
WebDriver
‘
object
has no
attribute
‘find_
element
_by_xpath‘
2023-11-05 22:28
Qinjiu_WenCha的博客
原因是在
selenium
4.x版本中已经弃用了find_
element
_by_xxx这样的写法,使用这样的写法就会报类似于find_
element
_by_xxx的错误。在使用
selenium
库时发现了无法使用find_
element
_by_xpath。方法的使用是find_
element
(by...
没有解决我的问题,
去提问
向专家提问
向AI提问
付费问答(悬赏)服务下线公告
◇ 用户帮助中心
◇ 新手如何提问
◇ 奖惩公告
问题事件
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
系统已结题
7月12日
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
已采纳回答
7月4日
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
创建了问题
7月4日