當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。