首页 > 技术文章 > Phantomjs + Alert 交互时Enter键输入无效【已知问题,无解】

alexzp 2016-09-21 19:37 原文

 

代码:

driver.switch_to.alert.accept()

报错:

Exception:

org.openqa.selenium.UnsupportedCommandException: Invalid Command Method - Request => {"headers":{...},"httpVersion":"1.1","method":"GET","url":"/alert_text","urlParsed":{...},"urlOriginal":"/session/13ddee20-110f-11e3-af52-a75f21929065/alert_text"}

 

在网上找了很多种方法,一直无解;

https://github.com/detro/ghostdriver/issues/20

论坛讨论详情;

 

推荐阅读