本文整理汇总了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());
}