使用selenium渲染爬虫bing浏览器,输入查询内容然后点击查询操作,输入内容操作无误,进行click操作时报错如下:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: headless chrome=112.0.5615.139)
Stacktrace:
Backtrace:
GetHandleVerifier [0x005E5E23+53059](No symbol)[0x00574AF1](No symbol)[0x0046B250](No symbol)[0x0049DA93](No symbol)[0x00492DE7](No symbol)[0x004BA7CC](No symbol)[0x00492746](No symbol)[0x004BAB24](No symbol)[0x004D066F](No symbol)[0x004BA5C6](No symbol)[0x00490A2C](No symbol)[0x004920ED]
GetHandleVerifier [0x0084D3CE+2573550]
GetHandleVerifier [0x00883340+2794592]
GetHandleVerifier [0x0087CF1C+2768956]
GetHandleVerifier [0x0067FA60+682880](No symbol)[0x0057EE22](No symbol)[0x0057A8B8](No symbol)[0x0057A99B](No symbol)[0x0056DB57]
BaseThreadInitThunk [0x76476359+25]
RtlGetAppContainerNamedObjectPath [0x775D7B74+228]
RtlGetAppContainerNamedObjectPath [0x775D7B44+180]
网上有有很多其他答案,本人错误点是
opts.add_argument(f"user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11")
错误原因是chrome版本,将17.0.963.56修改为112.0.5615.139后可以正确click操作
版权归原作者 男神阿甘 所有, 如有侵权,请联系我们删除。