shaka-project / generic-webdriver-server Goto Github PK
View Code? Open in Web Editor NEWA generic WebDriver server framework for use with Karma and Selenium, with backends for ChromeOS, Chromecast, Tizen, and Xbox One.
License: Apache License 2.0
A generic WebDriver server framework for use with Karma and Selenium, with backends for ChromeOS, Chromecast, Tizen, and Xbox One.
License: Apache License 2.0
.gitattributes needs to be set up so that code is checked out with consistent line endings on Windows.
The ChromeCast tools report any unrecognized message format, and we receive logs about the audio volume of the cast device whenever we send it commands. These should be ignored and not logged.
There is no need to deploy a custom receiver app for the Chromecast backend. The process is documented for the following reasons:
The docs, however, could make this clearer, so that users do not mistakenly assume that they must pay a Chromecast developer fee and deploy their own app to use this tool.
This issue was automatically created by Allstar.
Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code
Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.
Remediation Steps
To remediate, remove the generated executable artifacts from the repository.
Artifacts Found
Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.
Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
Related to #7, in which we should better document the requirements for loading content into an iframe as we do in the Chromecast receiver, we should also be able to detect failures in the receiver and show some appropriate error message on the device instead of a blank screen.
For example, this currently results in a blank screen, because google.com prevents embedding in an iframe:
chromecast-webdriver-cli --hostname=chromecast-hostname --url=https://www.google.com/
The Chromecast driver seems to have stopped working:
(node:5795) UnhandledPromiseRejectionWarning: Error: Failed to launch receiver! Reason: NOT_FOUND
at Channel.receiver.on (/usr/local/lib/node_modules/chromecast-webdriver-server/cast-utils.js:122:18)
Each backend has a separate document explaining how to set up and use SSH tunnels to talk to a device on another network. This is something we have had to do often for our own test lab, which is on a separate network from where we do our development.
However, most of the content in these tunneling docs is the same across the various Generic WebDriver Server backends. We should explore merging these docs and producing a general doc that covers all backends.
Basic docs on building a web app for WebOS:
This could work very similarly to the Tizen backend:
GenericWebDriverProvider.jar was shipped in v1.0.0 - v1.0.3 with a requirement that the user have Java 11 installed, whereas Selenium's jar only requires Java 6.
In the last few days, the Tizen Studio SDK's built-in distributor certificates expired. It is unclear to me how these can be replaced.
With packages being signed by now-expired distributor certs, our lab's Tizen TV refuses to let us install the package. This means we can't use Tizen in our Selenium grid any more.
For now, we're disabling the device in our lab grid config, but this needs to be resolved so that we can maintain Tizen as a supported platform in Shaka Player.
This issue was automatically created by Allstar.
Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code
Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.
Remediation Steps
To remediate, remove the generated executable artifacts from the repository.
Artifacts Found
Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.
Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
This issue was automatically created by Allstar.
Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code
Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.
Remediation Steps
To remediate, remove the generated executable artifacts from the repository.
Artifacts Found
Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.
Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
On macOS, Docker won't mount arbitrary paths. So we need to copy the Tizen app template into /tmp first.
docker: Error response from daemon: Mounts denied:
The path /usr/local/lib/node_modules/tizen-webdriver-server/app-template
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
Shutdown frequently fails with:
15:29:54.787 INFO [ResultConfig.handle] - Executing: [delete session: 51487242-4db9-4e7f-b3e1-d6ddd1d94676])
DELETE /session/c03e4bac1a19dcf1a769cb6371bfe1f1 {}
Session ID c03e4bac1a19dcf1a769cb6371bfe1f1 released
Uninstalling app
15:30:29.094 INFO [ActiveSessions$1.onStop] - Removing session org.openqa.selenium.remote.server.InMemorySession@646227ce
DELETE /session/c03e4bac1a19dcf1a769cb6371bfe1f1 {}
GET /shutdown {}
15:30:38.655 INFO [OsProcess.destroy] - Unable to drain process streams. Ignoring but the exception being swallowed follows.
org.apache.commons.exec.ExecuteException: The stop timeout of 2000 ms was exceeded (Exit value: -559038737)
at org.apache.commons.exec.PumpStreamHandler.stopThread(PumpStreamHandler.java:295)
[snip]
15:30:38.655 ERROR [OsProcess.destroy] - Unable to kill process java.lang.ProcessImpl@5eb2d927
Done
15:30:38.796 INFO [ResultConfig.handle] - Done: [delete session: 51487242-4db9-4e7f-b3e1-d6ddd1d94676]
It seems significant to me that it tries to shut down the session twice. Perhaps the first call takes too long, and it tries again.
Some of the time, after this happens, if we quickly try to start a new session, this will fail with:
https://hostname/api/taskmanager/app?appid=LONG_APP_ID => HTTP 400: {"ErrorMess
age":"Failed to launch the application.","ErrorCode":-2147024894}
at IncomingMessage.<anonymous> (path\to\npm\node_modules\xbox-one-webdriver-server\xbox-one-utils.js:287:25)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
method: 'POST',
url: 'https://hostname/api/taskmanager/app?appid=LONG_APP_ID',
statusCode: 400,
body: '{"ErrorMessage":"Failed to launch the application.","ErrorCode":-2147024894}'
}
I assume this is because the old session is still being shut down. In testing with the CLI, I found that building and installing the app to start a new session often takes ~25 seconds. Then shutting down and uninstalling the app could take as much as ~36 seconds.
Neither the base package nor any of the backends have unit or integration tests. The only thing even approaching testing is the use of eslint.
We need to decide the best way to test our testing tools.
This issue was automatically created by Allstar.
Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code
Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.
Remediation Steps
To remediate, remove the generated executable artifacts from the repository.
Artifacts Found
Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.
Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
HI there,
I've been trying to get this to work with WDIO and Appium and get the following error messages on the node
Session ID df2ab128dc932a04cb96614c3ef2a5d6 created
12:02:03.519 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
12:02:04.120 INFO [ResultConfig.handle] - Executing: [find element: By.cssSelector: [data-test-id="5"]])
POST /session/df2ab128dc932a04cb96614c3ef2a5d6/element { value: '[data-test-id="5"]', using: 'css selector' }
12:02:04.169 ERROR [FindElement.call] - Unexpected exception during findElement
org.openqa.selenium.UnsupportedCommandException: An unknown error has occurred
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'UKC02QK85KG8WN', ip: 'fe80:0:0:0:c8d:a184:cc6f:263c%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: df2ab128dc932a04cb96614c3ef2a5d6
*** Element info: {Using=css selector, value=[data-test-id="5"]}
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:420)
at org.openqa.selenium.By$ByCssSelector.findElement(By.java:431)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:49)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:32)
at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:125)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:200)
at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:84)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
My setup for the node is
java \
-Dgenericwebdriver.browser.name=tizen \
-Dgenericwebdriver.backend.exe=node_modules/tizen-webdriver-server/tizen-webdriver-server.js\
-Dgenericwebdriver.backend.params.hostname=192.168.0.26:26101\
-Dgenericwebdriver.backend.params.local-tizen-studio=true\
-Dgenericwebdriver.backend.params.wake-on-lan-address=true\
-Dgenericwebdriver.backend.params.tizen-studio-path=../../../../../../tizen-studio\
-Dgenericwebdriver.backend.params.tizen-studio-author-profile=dkh10\
-cp node_modules/generic-webdriver-server/GenericWebDriverProvider.jar:node_modules/generic-webdriver-server/selenium-server-standalone-3.141.59.jar \
org.openqa.grid.selenium.GridLauncherV3 \.
(The same thing occurs if I use i remove local-tizen studio, tizen-studio-path, tizen-studio-author-profile
The wdio config i use is
services: [
[
[
'appium',
{
logPath: './',
command: 'appium',
args: {
// ...
'show-config': true,
debugLogSpacing: true,
platformName: 'tizen',
deviceName: 'smarttv',
port: '5555',
'bootstrap-port': '5555',
// ...
},
},
],
],
],
capabilities: [
{
browserName: 'tizen',
port: 5555,
},
]
Thank you for reading this, I hope there is a way, that would be pretty awesome :)
In some cases, the Tizen device goes to sleep while idle, and needs to be woken up for testing. Ideally, there would be an option in the Tizen server and command line tools that would allow the user to specify the ethernet address of the device and wake it when it doesn't respond to pings right away.
Sites can prevent iframe-embedding with the X-Frame-Options header. Though this should not be an issue for a test runner, one of the first things a person might try with the command-line tools is:
chromecast-webdriver-cli --hostname=chromecast-hostname --url=https://www.google.com/
However, google.com prevents iframe embedding, which means it cannot be shown in our Chromecast receiver. The user would see a blank screen instead. This should be clearly documented to avoid confusion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.