DataMapperSteps.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:syndesis-qe 作者:
/**
     * @param first parameter to be combined.
     * @param first_pos position of the first parameter in the final string
     * @param second parameter to be combined.
     * @param sec_pos position of the second parameter in the final string.
     * @param combined above two into this parameter.
     * @param separator used to estethically join first and second parameter.
     */
    // And she combines "FirstName" as "2" with "LastName" as "1" to "first_and_last_name" using "Space" separator
    @Then("^she combines \"(\\w+)\" as \"(\\w+)\" with \"(\\w+)\" as \"(\\w+)\" to \"(\\w+)\" using \"(\\w+)\" separator$")
    public void combinePresentFielsWithAnother(String first, String first_pos,
            String second, String sec_pos, String combined, String separator) {
        SelenideElement inputElement;
        SelenideElement selectElement;

        // Then she fills "FirstCombine" selector-input with "FirstName" value
        inputElement = mapper.getElementByAlias("FirstSource").shouldBe(visible);
        mapper.fillInput(inputElement, first);

        // And she selects "Combine" from "ActionSelect" selector-dropdown
        selectElement = mapper.getElementByAlias("ActionSelect").shouldBe(visible);
        mapper.selectOption(selectElement, "Combine");

        // And she selects "Space" from "SeparatorSelect" selector-dropdown
        selectElement = mapper.getElementByAlias("SeparatorSelect").shouldBe(visible);
        mapper.selectOption(selectElement, separator);

        // And clicks on the "Add Source" link
        mapper.clickButton("Add Source");

        // Then she fills "SecondCombine" selector-input with "LastName" value
        inputElement = mapper.getElementByAlias("SecondSource").shouldBe(visible);
        mapper.fillInputAndConfirm(inputElement, second);

        // And she fills "FirstCombinePosition" selector-input with "2" value
        inputElement = mapper.getElementByAlias("FirstSourcePosition").shouldBe(visible);
        mapper.fillInput(inputElement, first_pos);

        // And she fills "SecondCombinePosition" selector-input with "1" value
        inputElement = mapper.getElementByAlias("SecondSourcePosition").shouldBe(visible);
        mapper.fillInput(inputElement, sec_pos);

        // Then she fills "TargetCombine" selector-input with "first_and_last_name" value
//      inputElement = mapper.getElementByAlias("FirstTarget").shouldBe(visible);
//      mapper.fillInputAndConfirm(inputElement, combined);
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号