• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InternetExplorerOptions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openqa.selenium.ie.InternetExplorerOptions的典型用法代码示例。如果您正苦于以下问题:Java InternetExplorerOptions类的具体用法?Java InternetExplorerOptions怎么用?Java InternetExplorerOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: settingBrowserSize

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Test
public void settingBrowserSize() {
    // given
    WebDriverProperties properties = new WebDriverProperties();
    properties.setProperty("browserSize", "1690x1000");

    // when
    Capabilities convertedCapabilities = internetExplorerCapabilitiesConverter.convert(properties);

    // then
    // expected safari options
    InternetExplorerOptions expectedInternetExplorerOptions = new InternetExplorerOptions();
    expectedInternetExplorerOptions.setCapability(CAPABILITY_AUTOCLOSE, false);
    expectedInternetExplorerOptions.setCapability(CAPABILITY_BROWSER_SIZE, "1690x1000");

    assertThat(convertedCapabilities.asMap()).isEqualTo(expectedInternetExplorerOptions.asMap());

}
 
开发者ID:isgarlo,项目名称:givemeadriver,代码行数:19,代码来源:InternetExplorerCapabilitiesConverterTest.java


示例2: setOptions

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
private void setOptions(InternetExplorerOptions options) {
    for (Map.Entry<Object, Object> entry : entrySet()) {
        String key = (String) entry.getKey();
        if (key.startsWith("desired.capabilities.")) {
            String preferenceKey = key.substring(21);
            String value = (String) entry.getValue();

            if (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false")) {
                boolean aBoolean = Boolean.valueOf(value);
                options.setCapability(preferenceKey, aBoolean);
            } else {
                try {
                    int intValue = Integer.parseInt(value);
                    options.setCapability(preferenceKey, intValue);
                } catch (NumberFormatException e) {
                    options.setCapability(preferenceKey, value);
                }
            }
        }
    }
    LOGGER.info("The properties was load with success: {}", toString());
}
 
开发者ID:sdl,项目名称:Testy,代码行数:23,代码来源:IExplorerConfigReader.java


示例3: convert

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public Capabilities convert(WebDriverProperties properties) {
    InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions();

    // general options for logging purpose
    internetExplorerOptions.setCapability(CAPABILITY_AUTOCLOSE, properties.isAutoClose());
    addToInternetExplorerOptionsIfNoEmptyValue(internetExplorerOptions, CAPABILITY_DRIVER_VERSION, properties.getDriverVersion());
    addToInternetExplorerOptionsIfNoEmptyValue(internetExplorerOptions, CAPABILITY_BROWSER_SIZE, properties.getBrowserSize());

    return internetExplorerOptions;
}
 
开发者ID:isgarlo,项目名称:givemeadriver,代码行数:12,代码来源:InternetExplorerCapabilitiesConverter.java


示例4: defaultIEOptions

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
public InternetExplorerOptions defaultIEOptions() {
    InternetExplorerOptions cap = new InternetExplorerOptions();
    cap.setCapability(INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
    cap.setCapability("ignoreZoomSetting", true);
    //cap.setCapability("requireWindowFocus", true);
    return (InternetExplorerOptions) modifyCapabilities.apply(cap);
}
 
开发者ID:epam,项目名称:JDI,代码行数:8,代码来源:SeleniumDriverFactory.java


示例5: getCapabilities

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public InternetExplorerOptions getCapabilities() {
    InternetExplorerOptions ieOptions = new InternetExplorerOptions();
    ieOptions.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
    ieOptions.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true);
    ieOptions.setCapability("requireWindowFocus", true);
    return ieOptions;
}
 
开发者ID:Frameworkium,项目名称:frameworkium-core,代码行数:9,代码来源:InternetExplorerImpl.java


示例6: create

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public WebDriver create(WebDriverFactory webDriverFactory, DesiredCapabilities desiredCapabilities) {
    InternetExplorerDriverServiceProperties serviceProperties = webDriverFactory.driverServices == null ? null : webDriverFactory.driverServices.getInternetExplorer();
    DriverService driverService = serviceProperties == null ? null : serviceProperties.getDriverService();
    InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions().merge(desiredCapabilities);
    return driverService == null ? new InternetExplorerDriver(internetExplorerOptions) : new RemoteWebDriver(driverService.getUrl(), internetExplorerOptions);
}
 
开发者ID:viltgroup,项目名称:minium,代码行数:8,代码来源:WebDriverFactory.java


示例7: getOptions

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
/***
 * If you're using Selenium Grid, make sure the selenium server is in the same folder with the IEDriverServer
 * or include the path to the ChromeDriver in command line when registering the node:
 * -Dwebdriver.chrome.driver=%{path to chrome driver}
 * @return Internet Explorer capabilities
 */
private InternetExplorerOptions getOptions() {
    InternetExplorerOptions options = new InternetExplorerOptions();
    setOptions(options);
    String driverPath = getProperty("browser.driver.path");
    if (!"".equals(driverPath)) {
        System.setProperty("webdriver.ie.driver", driverPath);
    }
    return options;
}
 
开发者ID:sdl,项目名称:Testy,代码行数:16,代码来源:IExplorerConfigReader.java


示例8: createDriver

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public WebDriver createDriver(URL remoteUrl) throws IOException {
    InternetExplorerOptions capabilities = getOptions();
    if (isRemoteDriver()) {
        RemoteWebDriver driver = new RemoteWebDriver(remoteUrl, capabilities);
        driver.setFileDetector(new LocalFileDetector());
        return driver;
    } else {
        return new InternetExplorerDriver(capabilities);
    }
}
 
开发者ID:sdl,项目名称:Testy,代码行数:12,代码来源:IExplorerConfigReader.java


示例9: addToInternetExplorerOptionsIfNoEmptyValue

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
private void addToInternetExplorerOptionsIfNoEmptyValue(InternetExplorerOptions internetExplorerOptions, String key, String value) {
    if (isNotEmpty(value)) {
        internetExplorerOptions.setCapability(key, value);
    }
}
 
开发者ID:isgarlo,项目名称:givemeadriver,代码行数:6,代码来源:InternetExplorerCapabilitiesConverter.java


示例10: createDriver

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public WebDriver createDriver(Capabilities capabilities) {
    String driverVersion = (String) capabilities.getCapability(CAPABILITY_DRIVER_VERSION);
    InternetExplorerDriverManager.getInstance().version(driverVersion).setup();
    return new InternetExplorerDriver((InternetExplorerOptions) capabilities);
}
 
开发者ID:isgarlo,项目名称:givemeadriver,代码行数:7,代码来源:InternetExplorerDriverFactory.java


示例11: getWebDriver

import org.openqa.selenium.ie.InternetExplorerOptions; //导入依赖的package包/类
@Override
public WebDriver getWebDriver(Capabilities capabilities) {
    return new InternetExplorerDriver(new InternetExplorerOptions(capabilities));
}
 
开发者ID:Frameworkium,项目名称:frameworkium-core,代码行数:5,代码来源:InternetExplorerImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StoredFieldsReader类代码示例发布时间:2022-05-22
下一篇:
Java NullStruct类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap