Selenium报错 AttributeError: ‘dict‘ object has no attribute ‘xx‘ (已解决)
selenium的查找元素并点击:self.driver.find_element_by_id("xx").click()
执行这句时报错:AttributeError: 'dict' object has no attribute 'click',断言发现,find_element_by_id确实返回了一个dict类型。
网上寻找答案后,解决如下:
将安装的selenium 4.0版本,降为3.141.0版本即可。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
二维码