Geckodriver没有回应

时间:2016-11-18 22:28:02

标签: python selenium selenium-webdriver geckodriver

我使用geckodriver和python selenium。简单命令driver = Webdriver.Firefox(),挂起python脚本。我调试,发现它是geckodriver没有响应。手动启动geckodriver并且curl也没有响应。但firefox实例已启动并准备就绪,但geckodriver未发送任何HTTP响应。关于如何进一步调试的任何想法?即使它需要在geckodriver上进行任何修补,我也想试试。

$ geckodriver --port 57738 &> gecko.log &
[1] 16123
$ jobs
[1]  + running    geckodriver --port 57738 &> gecko.log
$ curl -v --data '{"requiredCapabilities": {}, "desiredCapabilities": {"javascriptEnabled": true, "browserName": "firefox", "version": "", "platform": "ANY", "marionette": true}}' http://127.0.0.1:57738/session
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 57738 (#0)
> POST /session HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:57738
> Accept: */*
> Content-Length: 160
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 160 out of 160 bytes

gecko.log

$ cat gecko.log 
1479507861533   geckodriver INFO    Listening on 127.0.0.1:57738
1479507874758   mozprofile::profile INFO    Using profile path /tmp/rust_mozprofile.fkk6AqrNIGxB
1479507874759   geckodriver::marionette INFO    Starting browser /usr/bin/firefox
1479507874763   geckodriver::marionette INFO    Connecting to Marionette on localhost:36577
+ exec /usr/bin/firefox.real --marionette --profile /tmp/rust_mozprofile.fkk6AqrNIGxB

(firefox:16144): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:16144): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:16144): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:16144): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
1479507875413   Marionette  INFO    Listening on port 36577

0 个答案:

没有答案