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


Java BeforeSuite类代码示例

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


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

示例1: Setup

import com.thoughtworks.gauge.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void Setup() throws MalformedURLException {

    // Get Appium Properties
    String browser_name = System.getenv("BROWSER_NAME");
    String platform_name = System.getenv("PLATFORM_NAME");
    String platform_version = System.getenv("PLATFORM_VERSION");
    String new_command_timeout = System.getenv("NEW_COMMAND_TIMEOUT");
    String device_name = System.getenv("DEVICE_NAME");
    String appium_host_url = System.getenv("APPIUM_HOST_URL");

    // Set desiredCapabilities
    DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
    desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, browser_name);
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, platform_name);
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, platform_version);
    desiredCapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, new_command_timeout);
    desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, device_name);
    URL url = new URL(appium_host_url);

    driver = new AndroidDriver(url, desiredCapabilities);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

}
 
开发者ID:gemunulk,项目名称:gauge-java-maven-appium-web-demo,代码行数:25,代码来源:DriverFactory.java

示例2: Setup

import com.thoughtworks.gauge.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void Setup() {
    // Uses chrome driver by default
    String browser = System.getenv("BROWSER");
    if (browser == null) {
        browser = DEFAULT;
    }

    if (browser.toLowerCase().equals(FIREFOX)) {
        FirefoxDriverManager.getInstance().setup();
        driver = new FirefoxDriver();
    } else if (browser.toLowerCase().equals(IE)) {
        InternetExplorerDriverManager.getInstance().setup();
        driver = new InternetExplorerDriver();
    } else {
        ChromeDriverManager.getInstance().setup();
        driver = new ChromeDriver();
    }
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:20,代码来源:DriverFactory.java

示例3: init

import com.thoughtworks.gauge.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void init(){
    driver          = DriverFactory.getDriver();

    loginPage       = PageFactory.initElements(driver, LoginPage.class);
    logoutPage      = PageFactory.initElements(driver, LogoutPage.class);
}
 
开发者ID:gemunulk,项目名称:gauge-java-maven-appium-web-demo,代码行数:8,代码来源:PageFactory.java

示例4: initializeDriver

import com.thoughtworks.gauge.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void initializeDriver(){
    webDriver = DriverFactory.getDriver();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:5,代码来源:Driver.java


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