首页 > 解决方案 > 如何通过 selenium 打开幻影浏览器?

问题描述

我是 Rselenium 和 Phantomjs 的新手,我似乎无法在 R 中打开浏览器。我安装了 Phantomjs,所以我不知道为什么它不会打开。

Selenium message:Unable to create session from {
  "desiredCapabilities": {
    "browserName": "phantomjs",
    "javascriptEnabled": true,
    "nativeEvents": true,
    "version": "",
    "platform": "ANY"
  },
  "capabilities": {
    "firstMatch": [
      {
        "browserName": "phantomjs"
      }
    ]
  }
}
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'application-1005104-deployment-3272410-7j6h7', ip: '172.16.56.211', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-1044-aws', java.version: '1.8.0_212'
Driver info: driver.version: unknown

Could not open phantomjs browser.
Client error message:
     Summary: SessionNotCreatedException
     Detail: A new session could not be created.
     Further Details: run errorDetails method
Check server log for further details.

标签: rphantomjsrselenium

解决方案


推荐阅读