Skip to content

Instantly share code, notes, and snippets.

View diemol's full-sized avatar
🏠
Working from home

Diego Molina diemol

🏠
Working from home
View GitHub Profile
version: '2.2'
services:
zalenium:
image: "dosel/zalenium"
container_name: zalenium
hostname: zalenium
tty: true
privileged: true
volumes:
```
org.openqa.selenium.WebDriverException: java.io.EOFException: End of input at line 1 column 1cannot extract a capabilities from the request:
Command duration or timeout: 754 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
@diemol
diemol / Example_1
Last active April 6, 2020 08:06
WebDriver Payload
{
capabilities:
{
alwaysMatch:
{
browserName: 'firefox',
platformName: 'macOS 10.13',
browserVersion: 'latest'
sauce:options:
{
@diemol
diemol / SimpleChromeTest.java
Created June 16, 2020 10:33
SimpleChromeTest
public void simpleChromeTest() throws MalformedURLException {
URL gridUrl = new URL("http://localhost:4444/wd/hub");
RemoteWebDriver webDriver = new RemoteWebDriver(gridUrl, new ChromeOptions());
webDriver.get("http://www.google.com/ncr");
webDriver.findElement(By.name("q")).sendKeys("webdriver", Keys.RETURN);
WebDriverWait webDriverWait = new WebDriverWait(webDriver, Duration.ofSeconds(5));
webDriverWait.until(ExpectedConditions.titleContains("webdriver"));