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

Java Step类代码示例

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

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



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

示例1: showTheLogInStatusForUser

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Show the log in status for user <customer>")
public void showTheLogInStatusForUser(String customer) {
    WebDriver webDriver = Driver.webDriver;
    WebElement authenticatedInfo = webDriver.findElement(By.id("auth"));
    assertTrue(authenticatedInfo.isDisplayed());
    assertTrue(authenticatedInfo.getText().contains("Welcome " + customer + "! Not you?"));
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:8,代码来源:LogIn.java


示例2: LoginAsCustomerDetails

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Login as name <name> and <password>")
public void LoginAsCustomerDetails(String name, String password) {
    WebDriver webDriver = Driver.webDriver;
    webDriver.findElement(By.linkText("Log in")).click();
    webDriver.findElement(By.name("login")).sendKeys(name);
    webDriver.findElement(By.name("password")).sendKeys(password);
    webDriver.findElement(By.name("commit")).click();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:9,代码来源:LogIn.java


示例3: registerCustomerWith

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Sign up as <customer> with email <[email protected]> and <password>")
public void registerCustomerWith(String customer, String email, String password) {
    WebDriver webDriver = Driver.webDriver;
    webDriver.findElement(By.linkText("Sign up")).click();
    WebElement form = webDriver.findElement(By.id("new_user"));
    form.findElement(By.name("user[username]")).sendKeys(customer);
    form.findElement(By.name("user[email]")).sendKeys(email);
    form.findElement(By.name("user[password]")).sendKeys(password);
    form.findElement(By.name("user[password_confirmation]")).sendKeys(password);
    form.findElement(By.name("commit")).click();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:12,代码来源:CustomerSignup.java


示例4: clearPreviousLogin

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Clear previous login")
public void clearPreviousLogin() {
    try {
        logOut();
    } catch (Exception ex) {
        System.out.println("no previously logged in Customers");
    }
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:9,代码来源:LogOut.java


示例5: searchUser

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Fill in and send registration form")
public void searchUser() {
    String username = localPart();
    SignUpPage signUpPage = PageFactory.initElements(driver, SignUpPage.class);
    signUpPage.user_username.sendKeys(username);
    signUpPage.user_email.sendKeys(username.concat("@domain.com"));
    signUpPage.user_password.sendKeys("qweqwe");
    signUpPage.user_password_confirmation.sendKeys("qweqwe");
    signUpPage.commit.submit();
    // store generated username
    signUpPage.storeStringToScenarioDataStore("currentUser", username);
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:13,代码来源:UserSpec.java


示例6: verifyCustomers

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Search for customers <table>")
public void verifyCustomers(Table table) {
    List<TableRow> rows = table.getTableRows();
    List<String> columnNames = table.getColumnNames();
    for (TableRow row : rows) {
        searchUser(row.getCell(columnNames.get(0)));
        verifyUserIsListed(row.getCell(columnNames.get(0)));
    }
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:10,代码来源:CustomerSpec.java


示例7: CreateProduct

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Create a product <table>")
public void CreateProduct(Table table) {
    List<TableRow> rows = table.getTableRows();
    List<String> columnNames = table.getColumnNames();
    for (TableRow row : rows) {
        openNewProductsPage();
        CreateProductPage createProductPage = PageFactory.initElements(driver, CreateProductPage.class);
        createProductPage.create(row.getCell(columnNames.get(0)), row.getCell(columnNames.get(1)), row.getCell(columnNames.get(2)), row.getCell(columnNames.get(3)));
    }
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:11,代码来源:ProductSpec.java


示例8: updateProductValue

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Update product specifier to new value <table>")
public void updateProductValue(Table table) {
    List<TableRow> rows = table.getTableRows();
    List<String> columnNames = table.getColumnNames();
    for (TableRow row : rows) {
        openProductEditPage();
        EditProductPage editProductPage = PageFactory.initElements(driver, EditProductPage.class);
        editProductPage.updateProductValue(row.getCell(columnNames.get(0)), row.getCell(columnNames.get(1)));
    }
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:11,代码来源:ProductSpec.java


示例9: verifyProductValue

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Check product specifier has new value <table>")
public void verifyProductValue(Table table) {
    List<TableRow> rows = table.getTableRows();
    List<String> columnNames = table.getColumnNames();
    for (TableRow row : rows) {
        ProductPage productPage = PageFactory.initElements(driver, ProductPage.class);
        WebElement specifier = productPage.getWebElementByName((row.getCell(columnNames.get(0))));
        productPage.verifyProductSpecifier(specifier, row.getCell(columnNames.get(1)));
    }
}
 
开发者ID:getgauge-examples,项目名称:java-gradle-selenium,代码行数:11,代码来源:ProductSpec.java


示例10: stepWithTable

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Step that takes a table <table>")
public void stepWithTable(Table table) {
    System.out.println(table.getColumnNames());

    for (TableRow tableRow : table.getTableRows()) {
        System.out.println(tableRow.getCell("Product") + " " + tableRow.getCell("Description"));
    }
}
 
开发者ID:manupsunny,项目名称:gauge-gradle-plugin,代码行数:9,代码来源:StepImplementation.java


示例11: setLanguageVowels

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Vowels in English language are <vowelString>.")
public void setLanguageVowels(String vowelString) {
    vowels = new HashSet<>();
    for (char ch : vowelString.toCharArray()) {
        vowels.add(ch);
    }
}
 
开发者ID:getgauge,项目名称:gauge-maven-plugin,代码行数:8,代码来源:StepImplementation.java


示例12: verifyVowelsCountInMultipleWords

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Almost all words have vowels <wordsTable>")
public void verifyVowelsCountInMultipleWords(Table wordsTable) {
    for (TableRow row : wordsTable.getTableRows()) {
        String word = row.getCell("Word");
        int expectedCount = Integer.parseInt(row.getCell("Vowel Count"));
        int actualCount = countVowels(word);

        assertEquals(expectedCount, actualCount);
    }
}
 
开发者ID:getgauge,项目名称:gauge-maven-plugin,代码行数:11,代码来源:StepImplementation.java


示例13: addItemToTheBasket

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Add item <item> to the cart.")
public void addItemToTheBasket(String item) {
    WebDriver webDriver = Driver.webDriver;
    webDriver.findElement(By.linkText(item)).click();
    webDriver.findElement(By.linkText("Add to Card")).click();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:7,代码来源:PlaceOrder.java


示例14: placeTheOrder

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Checkout now")
public void placeTheOrder() {
    WebDriver webDriver = Driver.webDriver;
    webDriver.findElement(By.xpath("//input[@value='Checkout Now!']")).click();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:6,代码来源:PlaceOrder.java


示例15: cartNowContains

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Cart now contains <itemCount> number of items")
public void cartNowContains(int numberOfItems) {
    WebDriver webDriver = Driver.webDriver;
    List<WebElement> products = webDriver.findElements(By.xpath("//table/tbody/tr"));
    assertEquals(numberOfItems,products.size()-2);
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:7,代码来源:PlaceOrder.java


示例16: showAWelcomeMessage

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Show a message <message>")
public void showAWelcomeMessage(String message) {
    WebDriver webDriver = Driver.webDriver;
    WebElement flashNoticeElement = webDriver.findElement(By.xpath(String.format("//div[@id = 'flash_notice' and text() = '%s']", message)));
    assertTrue(flashNoticeElement.isDisplayed());
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:7,代码来源:FlashMessages.java


示例17: launchTheApplication

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Go to the store website")
public void launchTheApplication() {
    Driver.webDriver.get(APP_URL);
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:5,代码来源:AppLauncher.java


示例18: giveAnOptionToLogIn

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Give an option to Log In")
public void giveAnOptionToLogIn() {
    WebDriver webDriver = Driver.webDriver;
    WebElement logOut = webDriver.findElement(By.linkText("Log in"));
    assertTrue(logOut.isDisplayed());
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:7,代码来源:LogIn.java


示例19: seeItemsAvailableForPurchase

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("See items available for purchase.")
public void seeItemsAvailableForPurchase() {
    WebDriver webDriver = Driver.webDriver;
    List<WebElement> products = webDriver.findElements(By.className("product"));
    assertThat(products.size(), is(not(0)));
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:7,代码来源:CustomerSignup.java


示例20: logOutTheCustomer

import com.thoughtworks.gauge.Step; //导入依赖的package包/类
@Step("Log out the customer")
public void logOutTheCustomer() {
    logOut();
}
 
开发者ID:getgauge-examples,项目名称:java-maven-selenium,代码行数:5,代码来源:LogOut.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java CharsetUtil类代码示例发布时间:2022-05-22
下一篇:
Java TextChangeEventMode类代码示例发布时间: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