Pycharm CSS选择器异常无法找到元素

2024-10-04 07:38:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在学习编写一个投票机器人,它将使用Pycharm提交特定的投票表格,但收到错误消息:

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":".btn.margtop0"}

代码行此消息来自以下内容:

driver.find_element_by_css_selector('.btn.margtop0').click()

链接我在-https://topservers.com/minecraft/in-183上执行了测试

我是不是错过了一些简单的东西?因为我不能让它工作


Tags: 消息selenium错误机器人elementcommon投票selector