Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Modify Capability using YAML Config #427

Open
DeChrish opened this issue Mar 13, 2020 · 0 comments
Open

Modify Capability using YAML Config #427

DeChrish opened this issue Mar 13, 2020 · 0 comments

Comments

@DeChrish
Copy link

Browser Capabilities are updated to W3C Standards and Safari 13 defaults to the browser standards.
As per Saucelab guideline, we need to use the below capabilities config.

How to Modify the Capability and Bind with YAML Reader?

MutableCapabilities sauceCaps = new MutableCapabilities();
sauceCaps.setCapability("username", "someuser");
sauceCaps.setCapability("accessKey", "00000000-0000-0000-0000-000000000000");
sauceCaps.setCapability("name", "my test case");
 
MutableCapabilities caps = new MutableCapabilities();
caps.setCapability("sauce:options", sauceCaps);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("browserName", "firefox");
caps.setCapability("browserVersion", "latest");
         
WebDriver driver = new RemoteWebDriver(new URL("https://ondemand.saucelabs.com/wd/hub"), caps);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant