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


Java Platform.VISTA属性代码示例

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


在下文中一共展示了Platform.VISTA属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: external

@DataProvider
public Object[][] external() {
    return new Object[][]{
            {"win7", Platform.VISTA},
            {"vista", Platform.VISTA},
            {"Vista", Platform.VISTA},
            {"win8_1", Platform.WIN8_1},
            {"XP", Platform.XP},
            {"Win7", Platform.VISTA},
            {"win7", Platform.VISTA},
            {"Windows Server 2012", Platform.WIN8},
            {"windows 8", Platform.WIN8},
            {"win8", Platform.WIN8},
            {"windows 8.1", Platform.WIN8_1},
            {"win8.1", Platform.WIN8_1},
            {null, null},
            {"w8", null},
            {Platform.ANDROID, Platform.ANDROID}
    };
}
 
开发者ID:jabbrwcky,项目名称:selenium-api,代码行数:20,代码来源:PlatformMatcherTest.java

示例2: 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

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

示例4: nonMatchParam

@CapabilityFilter(platform = Platform.VISTA)
@Test
public void nonMatchParam() throws Exception {
	assertAllAssumed();
}
 
开发者ID:hifive,项目名称:hifive-pitalium,代码行数:5,代码来源:AssumeCapabilityTest.java

示例5: createChromeBrowser

private void createChromeBrowser(DesiredCapabilities capabilities) throws MalformedURLException {

    if (scope == BrowserScope.LOCAL) {
      // Management of chromedriver
      ChromeDriverManager.getInstance().setup();
    }

    // Chrome options
    ChromeOptions options = new ChromeOptions();

    // Chrome extensions
    if (extensions != null && !extensions.isEmpty()) {

      for (Map<String, String> extension : extensions) {
        InputStream is = getExtensionAsInputStream(extension.values().iterator().next());
        if (is != null) {
          try {
            File crx = File.createTempFile(extension.keySet().iterator().next(), ".crx");
            FileUtils.copyInputStreamToFile(is, crx);
            options.addExtensions(crx);
          } catch (Throwable t) {
            log.error("Error loading Chrome extension {} ({} : {})", extension, t.getClass(),
                t.getMessage());
          }
        }
      }
    }

    if (enableScreenCapture) {
      // This flag enables the screen sharing
      options.addArguments("--enable-usermedia-screen-capturing");

      String windowTitle = TEST_SCREEN_SHARE_TITLE_DEFAULT;
      if (platform != null
          && (platform == Platform.WINDOWS || platform == Platform.XP || platform == Platform.VISTA
              || platform == Platform.WIN8 || platform == Platform.WIN8_1)) {

        windowTitle = TEST_SCREEN_SHARE_TITLE_DEFAULT_WIN;
      }
      options.addArguments("--auto-select-desktop-capture-source="
          + getProperty(TEST_SCREEN_SHARE_TITLE_PROPERTY, windowTitle));

    } else {
      // This flag avoids grant the camera
      options.addArguments("--use-fake-ui-for-media-stream");
    }

    // This flag avoids warning in Chrome. See:
    // https://code.google.com/p/chromedriver/issues/detail?id=799
    options.addArguments("--test-type");

    if (protocol == Protocol.FILE) {
      // This flag allows reading local files in video tags
      options.addArguments("--allow-file-access-from-files");
    }

    if (!usePhysicalCam) {
      // This flag makes using a synthetic video (green with
      // spinner) in WebRTC. Or it is needed to combine with
      // use-file-for-fake-video-capture to use a file faking the
      // cam
      options.addArguments("--use-fake-device-for-media-stream=fps=30");

      if (video != null && (isLocal() || isDocker())) {

        if (!Files.exists(Paths.get(video))) {
          throw new RuntimeException("Trying to create a browser using video file " + video
              + ", but this file doesn't exist.");
        }

        log.debug("Using video {} in browser {}", video, id);
        options.addArguments("--use-file-for-fake-video-capture=" + video);
      }
    }

    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    capabilities.setBrowserName(DesiredCapabilities.chrome().getBrowserName());

    createDriver(capabilities, options);
  }
 
开发者ID:Kurento,项目名称:kurento-java,代码行数:80,代码来源:Browser.java


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