本文整理匯總了Java中org.openqa.selenium.Platform.LINUX屬性的典型用法代碼示例。如果您正苦於以下問題:Java Platform.LINUX屬性的具體用法?Java Platform.LINUX怎麽用?Java Platform.LINUX使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.openqa.selenium.Platform
的用法示例。
在下文中一共展示了Platform.LINUX屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testEquals_OS
@Test
public void testEquals_OS() {
TestEnvironment left = new TestEnvironment(null, null, Platform.WINDOWS);
TestEnvironment right = new TestEnvironment(null, null, Platform.WINDOWS);
assertTrue(left.matches(right));
right = new TestEnvironment(null, null, Platform.LINUX);
assertFalse(left.matches(right));
right = new TestEnvironment(null, null, Platform.XP);
assertTrue(left.matches(right));
right = new TestEnvironment(null, null, Platform.VISTA);
assertTrue(left.matches(right));
right = new TestEnvironment(null, null, Platform.ANY);
assertTrue(left.matches(right));
}
示例2: addPlatform
@Override
public WebCapabilitiesBuilder addPlatform(final String platform)
{
Platform platformName = null;
switch (platform.toLowerCase())
{
case "windows":
platformName = Platform.WINDOWS;
break;
case "xp":
platformName = Platform.XP;
break;
case "linux":
platformName = Platform.LINUX;
break;
case "mac":
platformName = Platform.MAC;
break;
default:
platformName = Platform.WINDOWS;
break;
}
capabilities.setPlatform(platformName);
return this;
}
示例3: platforms
@DataProvider
public Object[][] platforms() {
return new Object[][]{
{"win7", Platform.VISTA, true},
{"win7", "windows 7", true},
{"vista", Platform.VISTA, true},
{"darwin", Platform.MAC, true},
{Platform.ANY, Platform.LINUX, true},
{"linux", Platform.LINUX, true},
{"linux", Platform.UNIX, false},
{null, Platform.XP, true},
};
}
示例4: testWebElementsDriverProperties
@Test
public void testWebElementsDriverProperties() throws MalformedURLException {
DesiredCapabilities expectedDesiredCapabilities = new DesiredCapabilities(BrowserType.CHROME, "39.0", Platform.LINUX);
assertThat(new DesiredCapabilities(webDriverProperties.getDesiredCapabilities()), equalTo(expectedDesiredCapabilities));
assertThat(webDriverProperties.isStateful(), equalTo(true));
assertThat(webDriverProperties.getUrl(), equalTo(new URL("http://localhost:4444/wd/hub")));
assertThat(webDriverProperties.getWindow().getSize(), equalTo(new DimensionProperties(1280, 1024)));
assertThat(webDriverProperties.getWindow().getPosition(), nullValue());
}