Chromecast WebDriver Server
Part of the Generic WebDriver Server family.
npm install --save-dev generic-webdriver-server chromecast-webdriver-server
In the command-line for the Selenium node, set the following Java system properties:
genericwebdriver.browser.name: We recommend the value "chromecast". See also notes in the "Setup" doc.
genericwebdriver.backend.exe: The path to the executable, such as
genericwebdriver.backend.params.hostname: The hostname or IP address of the Chromecast device, with optional port number. If omitted, this must be provided in the client's desired capabilities instead. (See below.)
This backend supports the following parameters:
hostname: (required) The hostname or IP address of the Chromecast device, with optional port number.
receiver-app-id: The receiver app ID to load, in case you want to host your own copy. (See also receiver-deployment.md)
idle-timeout-seconds: The timeout for idle sessions, after which they will be closed.
connection-timeout-seconds: The connection timeout for the Chromecast, after which the corresponding WebDriver operation will fail.
Chromecast receiver deployment
Deploying your own copy of the Chromecast receiver is completely optional. Doing so would allow you to:
- Make changes to the receiver app that affect your clients
- Not depend on github.io being up or accessible from your network
Unless you need one of these things, we recommend using the default receiver app ID, which points to a copy served by github.io.
To learn how to deploy your own copy of the Chromecast Receiver, see receiver-deployment.md for details.
How it works
See how-it-works.md for details.
Tunneling to a Chromecast on another network
See tunneling.md for details.
Using the CLI
In addition to running a Chromecast node in Selenium, this package offers a CLI
for directing a Chromecast to a specific URL. For example, if installed
npm install -g chromecast-webdriver-server:
chromecast-webdriver-cli --hostname=192.168.1.42 \ --url=https://shaka-player-demo.appspot.com/demo/
We show an arbitrary URL on the device by embedding it into an iframe in our
Chromecast receiver app. However, sites can prevent iframe-embedding with the
Though this should not be an issue for a test runner, this may affect other URLs. Unfortunately, there is no way for the receiver app to detect when this has happened. See: https://github.com/shaka-project/generic-webdriver-server/issues/8