I am using robot framework Java version for test automation.
For remote execution we are using “Selenoid” with chrome90 image.
Below is the configuration and keyword i have done to pass the desired capabilities.
public String getCapabilities() {
ChromeOptions options = new ChromeOptions();
options.setCapability(“selenoid:options”, new HashMap<String, Object>(){
{
put(“enableVNC”, true);
}
});
DesiredCapabilities crcapabilities = new DesiredCapabilities();
//crcapabilities.setCapability(ChromeOptions.CAPABILITY, options);
crcapabilities.setCapability("enableVNC", true);
return crcapabilities.toJson().toString();
}
used the above Java method and created a custom robot keyword.
Below are the Robot Keywords for launching browser with desired capability
Log To Console “Test Started”
Sleep 2
Create Screenshot Folder
Open Browser ${SSO_URL} ${Browser} None http://0.0.0.0:4444/wd/hub/ desired_capabilities=${desired caps}
But in the execution below warning is thrown and my test execution is not displayed in Selenoid UI.
[ WARN ] Invalid desiredCapabilities: desired_capabilities={enableVNC=true}
Could some one help me with the right syntax to pass the capabilities in robot framework.
Library version -
org.robotframework
robotframework
4.0.1
<dependency>
<!-- https://mvnrepository.com/artifact/com.github.hi-fi/robotframework-seleniumlibrary -->
<groupId>com.github.hi-fi</groupId>
<artifactId>robotframework-seleniumlibrary</artifactId>
<version>4.0.0-alpha-2.0</version>
Note - when i use the same capabilities and run tests using Protractor/ Java, Selenium framework it works fine i am able to view the test execution on selenoid.