Example usage for org.openqa.selenium ImmutableCapabilities ImmutableCapabilities

List of usage examples for org.openqa.selenium ImmutableCapabilities ImmutableCapabilities

Introduction

In this page you can find the example usage for org.openqa.selenium ImmutableCapabilities ImmutableCapabilities.

Prototype

public ImmutableCapabilities(String k, Object v) 

Source Link

Usage

From source file:org.openqa.grid.selenium.node.ChromeMutatorTest.java

License:Apache License

@Test
public void shouldDoNothingIfBrowserNameIsNotChrome() {
    ImmutableCapabilities caps = new ImmutableCapabilities("browserName", "cake");

    ImmutableCapabilities seen = new ChromeMutator(defaultConfig).apply(caps);

    // Make sure we return exactly the same instance of the capabilities, and not just a copy.
    assertSame(caps, seen);//from  w  w  w . j ava  2s . c  om
}

From source file:org.openqa.grid.selenium.node.FirefoxMutatorTest.java

License:Apache License

@Test
public void shouldDoNothingIfBrowserNameIsNotFirefox() {
    ImmutableCapabilities caps = new ImmutableCapabilities("browserName", "chrome");

    ImmutableCapabilities seen = new FirefoxMutator(defaultConfig).apply(caps);

    // Make sure we return exactly the same instance of the capabilities, and not just a copy.
    assertSame(caps, seen);/*w  w w. j  ava 2 s. c  o m*/
}

From source file:org.openqa.grid.selenium.node.FirefoxMutatorTest.java

License:Apache License

@Test
public void shouldInjectBinaryIfNotSpecified() {
    ImmutableCapabilities caps = new ImmutableCapabilities("browserName", "firefox");
    ImmutableCapabilities seen = new FirefoxMutator(defaultConfig).apply(caps);

    assertEquals(seen.getCapability("firefox_binary"), defaultConfig.getCapability("firefox_binary"));

    @SuppressWarnings("unchecked")
    Map<String, Object> options = (Map<String, Object>) seen.getCapability(FIREFOX_OPTIONS);

    assertEquals(options.get("binary"), defaultConfig.getCapability("firefox_binary"));
}