当前位置: 首页>>代码示例>>Java>>正文


Java Platform.ANY属性代码示例

本文整理汇总了Java中org.openqa.selenium.Platform.ANY属性的典型用法代码示例。如果您正苦于以下问题:Java Platform.ANY属性的具体用法?Java Platform.ANY怎么用?Java Platform.ANY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.openqa.selenium.Platform的用法示例。


在下文中一共展示了Platform.ANY属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:19,代码来源:TestEnvironmentTest.java

示例2: createDriver

@BeforeClass public void createDriver() {
    JavaProfile profile = new JavaProfile(LaunchMode.JAVA_COMMAND_LINE);
    File f = findFile();
    profile.addClassPath(f);
    profile.setMainClass("com.sun.swingset3.SwingSet3");
    DesiredCapabilities caps = new DesiredCapabilities("java", "1.5", Platform.ANY);
    driver = new JavaDriver(profile, caps, caps);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:LaunchJavaCommandLineTest.java

示例3: createDriver

@BeforeClass public void createDriver() {
    JavaProfile profile = new JavaProfile(LaunchMode.COMMAND_LINE);
    File f = findFile();
    profile.setCommand(f.getAbsolutePath());
    profile.addApplicationArguments("Argument1");
    DesiredCapabilities caps = new DesiredCapabilities("java", "1.5", Platform.ANY);
    driver = new JavaDriver(profile, caps, caps);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:LaunchCommandLineTest.java

示例4: createDriver

@BeforeMethod public void createDriver() {
    System.setProperty(Constants.PROP_PROJECT_FRAMEWORK, Constants.FRAMEWORK_SWING);
    JavaProfile profile = new JavaProfile(LaunchMode.JAVA_COMMAND_LINE);
    File f = findFile();
    profile.addClassPath(f);
    profile.setRecordingPort(startRecordingServer());
    profile.setMainClass("com.sun.swingset3.SwingSet3");
    DesiredCapabilities caps = new DesiredCapabilities("java", "1.5", Platform.ANY);
    driver = new JavaDriver(profile, caps, caps);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:10,代码来源:LaunchJavaCommandLineTest.java

示例5: createDriver

@BeforeClass public void createDriver() {
    System.setProperty(Constants.PROP_PROJECT_FRAMEWORK, Constants.FRAMEWORK_SWING);
    JavaProfile profile = new JavaProfile(LaunchMode.COMMAND_LINE);
    File f = findFile();
    profile.setCommand(f.getAbsolutePath());
    profile.setRecordingPort(startRecordingServer());
    DesiredCapabilities caps = new DesiredCapabilities("java", "1.5", Platform.ANY);
    driver = new JavaDriver(profile, caps, caps);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:9,代码来源:LaunchCommandLineTest.java

示例6: getTestCaseRunManager

static Queue<RunContext> getTestCaseRunManager() {
    Queue<RunContext> execQ = new LinkedList<>();
    RunContext exe = new RunContext();
    exe.Scenario = globalSettings.getScenario();
    exe.TestCase = globalSettings.getTestCase();
    exe.Description = "Test Run";
    exe.BrowserName = globalSettings.getBrowser();
    exe.Browser = Browser.fromString(exe.BrowserName);
    exe.Platform = Platform.ANY;
    exe.BrowserVersion = "default";
    exe.Iteration = "Single";
    exe.print();
    execQ.add(exe);
    return execQ;
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:15,代码来源:RunManager.java

示例7: createBrowser

@Override
public Browser createBrowser() {
    String browserName = configuration.getRemoteBrowserName();
    String browserVersion = configuration.getRemoteBrowserVersion();
    DesiredCapabilities capabilities = new DesiredCapabilities(browserName, browserVersion, Platform.ANY);
    capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
    capabilities.setCapability(CapabilityType.HAS_NATIVE_EVENTS, false);
    capabilities.setCapability("marionette", configuration.getRemoteFirefoxMarionette());
    setOptionalProxyConfiguration(capabilities);
    return createBrowser(capabilities);
}
 
开发者ID:testIT-WebTester,项目名称:webtester2-core,代码行数:11,代码来源:RemoteFactory.java

示例8: registerDefaults

private void registerDefaults(Platform current) {
  for (Map.Entry<Capabilities, String> entry : defaultDrivers.entrySet()) {
    Capabilities caps = entry.getKey();
    if (caps.getPlatform() == null || caps.getPlatform() == Platform.ANY || current.is(caps.getPlatform())) {
      registerDriver(caps, entry.getValue());
    } else {
      log.info("Default driver " + entry.getValue() + " registration is skipped: registration capabilities "
               + caps.toString() + " does not match with current platform: " + current.toString());
    }
  }
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:11,代码来源:DefaultDriverSessions.java

示例9: registerDriverProviders

private void registerDriverProviders(Platform current) {
  for (DriverProvider provider : ServiceLoader.load(DriverProvider.class)) {
    Capabilities caps = provider.getProvidedCapabilities();
    if (caps.getPlatform() == null || caps.getPlatform() == Platform.ANY || current.is(caps.getPlatform())) {
      factory.registerDriverProvider(caps, provider);
    } else {
      log.info("Driver provider " + provider + " registration is skipped: registration capabilities "
               + caps.toString() + " does not match with current platform: " + current.toString());
    }
  }
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:11,代码来源:DefaultDriverSessions.java

示例10: toPlatformFamily

/**
 * {@link Platform#family()}から辿れるPlatformの親一覧を取得します。
 * 
 * @param platform 対象のPlatform
 * @return 引数のPlatformと、引数のPlatformの親Platform一覧
 */
private static Collection<Platform> toPlatformFamily(Platform platform) {
	Set<Platform> platforms = EnumSet.noneOf(Platform.class);
	if (platform == null) {
		return platforms;
	}

	platforms.add(platform);

	Platform parent = platform;
	while ((parent = parent.family()) != Platform.ANY) {
		platforms.add(parent);
	}
	return platforms;
}
 
开发者ID:hifive,项目名称:hifive-pitalium,代码行数:20,代码来源:AssumeCapability.java

示例11: getPlatform

private static Platform getPlatform(TestSlot slot) {
  Object o = slot.getCapabilities().get(CapabilityType.PLATFORM);
  if (o == null) {
    return Platform.ANY;
  } else {
    if (o instanceof String) {
      return Platform.valueOf((String) o);
    } else if (o instanceof Platform) {
      return (Platform) o;
    } else {
      throw new GridException("Cannot cast " + o + " to org.openqa.selenium.Platform");
    }
  }
}
 
开发者ID:aimmac23,项目名称:selenium-reliable-node-plugin,代码行数:14,代码来源:WebProxyHtmlRendererBeta.java

示例12: getDriverFactory

@Override
public DriverFactory getDriverFactory() {
    String gridUrl = getProperty(SELENIUM_GRID_URL);
    String browser = getProperty(SELENIUM_BROWSER);
    DesiredCapabilities desiredCapabilities = new DesiredCapabilities(browser, "", Platform.ANY);
    return new RemoteDriverFactory<>(RemoteWebDriver::new, gridUrl, desiredCapabilities);
}
 
开发者ID:fhoeben,项目名称:hsac-fitnesse-fixtures,代码行数:7,代码来源:SimpleSeleniumGridDriverFactoryFactory.java

示例13: 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},
    };
}
 
开发者ID:jabbrwcky,项目名称:selenium-api,代码行数:13,代码来源:PlatformMatcherTest.java

示例14: getPlatform

static Platform getPlatform(String platform) {
    if (platform != null && !platform.trim().isEmpty()) {
        return Platform.fromString(platform.toUpperCase());
    }
    return Platform.ANY;
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:6,代码来源:RunManager.java

示例15: RemoteDriverConfig

/**
 * Constructor.
 */
public RemoteDriverConfig() {
    super();
    this.version = "";
    this.platform = Platform.ANY;
}
 
开发者ID:LearnLib,项目名称:alex,代码行数:8,代码来源:RemoteDriverConfig.java


注:本文中的org.openqa.selenium.Platform.ANY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。