selenium运行结果及报错内容
Traceback (most recent call last):
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="J_bottomPage"]/span[2]/input"}
(Session info: chrome=107.0.5304.88)
(Driver info: chromedriver=107.0.5304.62 (1eec40d3a5764881c92085aaee66d25075c159aa-refs/branch-heads/5304@{#942}),platform=Windows NT 10.0.19044 x86_64)
没有匹配到定位元素
没有匹配到元素。
1.检查xpath表达式是否正确
2.或者查看页面元素是否在iframe中,如果在这iframe里面需要先切换到这个iframe里面再定位。
一般就这两种可能,有帮助的话采纳一下哦!
xpath有问题,检查一下xpath