RSelenium
RSelenium copied to clipboard
Unrecognized platform ...
The Problem
When combining Rselenium with phantomjs I get an error -- since very recently / this code worked a week back.
library("RSelenium")
selenium_engines <- rsDriver(browser = "phantomjs")
[...]
[1] "Connecting to remote server"
Selenium message:Unrecognized platform: windows-10-32bit
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'JONAS', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: RemoteWebDriver
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
Further Details: run errorDetails method
Analysis / Background Information
This seems to be caused by an error in the current Selenium server version 3.6.0 -- see also here: https://github.com/SeleniumHQ/selenium/issues/4781
Following the issue above I also tried to set platform to "ANY" via platform = "ANY"
and extraCapability = list("Platform", "ANY")
parameter but this seems to change nothing / does not seem to work.
Workaround / Solution
Explicitly ask RSelenium to use another version:
library(RSelenium)
# get list of available versions
binman::list_versions("seleniumserver")
## $generic
## [1] "3.5.0" "3.5.1" "3.5.2" "3.5.3" "3.6.0"
# use explicit version
selenium_engines <- rsDriver(browser = "phantomjs", version = "3.5.3")
Operating System
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)
3.6.0
Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)
phantomjs 2.1.1
Thanks @petermeissner for reporting this. I see the same across os's. As an aside you can use chrome headless with win 10 now see https://github.com/ropensci/RSelenium/issues/138 . I would imagine an updated binary that addresses the issue will be published.