为什么click()之后Selenium脚本项目无法继续

时间:2019-05-29 23:22:42

标签: python python-3.x selenium

这是我的代码:

myproject.py

userName.send_keys(user_name)
passWord.send_keys(pass_word)

Button.click()

print("1")

当我执行Button.click()时,页面可以成功跳转,但是即使只是print()语句也无法继续进行下一步。

下一页显示如下图。

enter image description here enter image description here

在下一页中,它上面有警报窗口,我无法切换到该窗口。该程序给我一个错误信息:

  

[20120:10844:0529 / 150013.017:ERROR:textfield.cc(1773)]未实现

我也使用了submit(),它也没有改变。我对这个问题真的很困惑,所以我检查了硒库:

来自硒的webelement.py

def click(self):
    """Clicks the element."""
    print("1")
    self._execute(Command.CLICK_ELEMENT)
    print("2")

以某种方式无法打印print("2")

如果有人知道原因,请告诉我。

0 个答案:

没有答案
相关问题