use of org.openqa.selenium.remote.DesiredCapabilities in project jmeter-plugins by undera.
the class HtmlUnitDriverConfig method createCapabilities.
Capabilities createCapabilities() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, createProxy());
capabilities.setCapability("javascriptEnabled", "true");
return capabilities;
}
use of org.openqa.selenium.remote.DesiredCapabilities in project jmeter-plugins by undera.
the class InternetExplorerDriverConfig method createCapabilities.
Capabilities createCapabilities() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, createProxy());
capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
return capabilities;
}
use of org.openqa.selenium.remote.DesiredCapabilities in project jmeter-plugins by undera.
the class RemoteDesiredCapabilitiesFactory method build.
public static DesiredCapabilities build(RemoteCapability capability) {
DesiredCapabilities desiredCapabilities;
if (RemoteCapability.CHROME.equals(capability)) {
ChromeOptions options = new ChromeOptions();
desiredCapabilities = DesiredCapabilities.chrome();
desiredCapabilities.setCapability(ChromeOptions.CAPABILITY, options);
return desiredCapabilities;
} else if (RemoteCapability.FIREFOX.equals(capability)) {
FirefoxProfile profile = new FirefoxProfile();
desiredCapabilities = DesiredCapabilities.firefox();
desiredCapabilities.setCapability(FirefoxDriver.PROFILE, profile);
return desiredCapabilities;
} else if (RemoteCapability.INTERNET_EXPLORER.equals(capability)) {
desiredCapabilities = DesiredCapabilities.internetExplorer();
return desiredCapabilities;
} else if (RemoteCapability.PHANTOMJS.equals(capability)) {
desiredCapabilities = DesiredCapabilities.phantomjs();
return desiredCapabilities;
}
throw new IllegalArgumentException("No such capability");
}
use of org.openqa.selenium.remote.DesiredCapabilities in project jmeter-plugins by undera.
the class RemoteDesiredCapabilitiesFactoryTest method shouldReturnInternetExplorerDriverWhenInternetExplorerCapabilityIsPassed.
@Test
public void shouldReturnInternetExplorerDriverWhenInternetExplorerCapabilityIsPassed() throws Exception {
DesiredCapabilities capabilities = RemoteDesiredCapabilitiesFactory.build(RemoteCapability.INTERNET_EXPLORER);
assertThat(capabilities.getBrowserName(), is("internet explorer"));
}
use of org.openqa.selenium.remote.DesiredCapabilities in project jmeter-plugins by undera.
the class RemoteDesiredCapabilitiesFactoryTest method shouldReturnPhantomJSDriverWhenPhantomJSCapabilityIsPassed.
@Test
public void shouldReturnPhantomJSDriverWhenPhantomJSCapabilityIsPassed() throws Exception {
DesiredCapabilities capabilities = RemoteDesiredCapabilitiesFactory.build(RemoteCapability.PHANTOMJS);
assertThat(capabilities.getBrowserName(), is("phantomjs"));
}
Aggregations