Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to pass boolean values in chrome capabilites #133

Open
cvarshn-cloud opened this issue Jun 3, 2021 · 4 comments
Open

Not able to pass boolean values in chrome capabilites #133

cvarshn-cloud opened this issue Jun 3, 2021 · 4 comments

Comments

@cvarshn-cloud
Copy link

cvarshn-cloud commented Jun 3, 2021

@wakaleo @jeffjensen @mojavelinux @vikramvi @mthmulders
I am running tests on selenoid using serenity and not able to pass below capabilities:

  1. enableVNC=true;
  2. enableVideo=true;

Getting below error

Caused by: org.openqa.selenium.WebDriverException: json: cannot unmarshal string into Go struct field Caps.desiredCapabilities.enableVideo of type bool (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 165 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'slave-m6xpj', ip: '10.233.94.150', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1127.19.1.el7.x86_64', java.version: '1.8.0_242'
Driver info: driver.version: DefaultRemoteDriver

Tried below not successful:

  1. serenity.driver.capabilities="enableVNC:true; enableVideo:true"
  2. chrome.capabilities.enableVNC=true
    chrome.capabilities.enableVideo=true
    3.chrome.switches="--headless,--disable-plugins,--disable-extensions,--disable-infobars,--enableVNC=true,--enableVideo=true"

Can you please help me out ASAP on this?

@wakaleo
Copy link
Member

wakaleo commented Jun 4, 2021

Serenity already converts Strings like this to booleans before passing it into the capabilities object. What version of Serenity are you using?

@cvarshn-cloud
Copy link
Author

Serenity already converts Strings like this to booleans before passing it into the capabilities object. What version of Serenity are you using?

2.2.13

@wakaleo
Copy link
Member

wakaleo commented Jun 7, 2021

Try with 2.4.34

@Cvarshney-clgx
Copy link

Cvarshney-clgx commented Jan 20, 2023

@wakaleo @jeffjensen @mojavelinux Its not working , I need to pass below to serenity.properties file

ChromeOptions options = new ChromeOptions();
options.setCapability("browserVersion", "108.0");
options.setCapability("selenoid:options", new HashMap<String, Object>() {{
/* How to add test badge */
put("name", "Test badge...");

/* How to set session timeout */
put("sessionTimeout", "15m");

/* How to set timezone */
put("env", new ArrayList<String>() {{
    add("TZ=UTC");
}});

/* How to add "trash" button */
put("labels", new HashMap<String, Object>() {{
    put("manual", "true");
}});

/* How to enable video recording */
put("enableVideo", true);

}});
RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), options);

How to pass these capabilities in serenity.properties. I am using 3.4.3 version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants