How can I pass capabilities in Selenium 3 with Cucumber?
Hello Tim- khorev,
You can refer to our Desired capability generator or you can also check the sample code snippet below from our Support documentation:
DesiredCapabilities capability = new DesiredCapabilities();
capability.setCapability(CapabilityType.BROWSER_NAME, browser);
capability.setCapability(CapabilityType.VERSION,version);
capability.setCapability(CapabilityType.PLATFORM, platform);
capability.setCapability("build", "Your Build Name");
String gridURL = "https://" + username + ":" + accesskey + "@hub.lambdatest.com/wd/hub";
System.out.println(gridURL);
connection = new RemoteWebDriver(new URL(gridURL), capability);
System.out.println(capability);
System.out.println(connection);