【问题标题】:How to verify page title in selenium using keyword framework如何使用关键字框架验证硒中的页面标题
【发布时间】:2019-01-07 09:30:52
【问题描述】:

使用关键字框架在 selenium 中验证页面标题的关键字、对象类型、对象名称和值应该是什么。

【问题讨论】:

    标签: selenium frameworks keyword


    【解决方案1】:

    如果它可以用于您的问题,请参考以下内容:

    // Method to get title and verify with expected
    public static void AssertEqualsTitle(WebDriver driver, String expectedTitle) {
        String actualText = driver.getTitle();
        Assert.assertTrue(actualText.toLowerCase().contains(expectedTitle.toLowerCase()));
    }
    

    【讨论】:

    • 这个方法是已知的,但需要一些与关键字框架相关的东西来验证我的标题
    猜你喜欢
    • 1970-01-01
    • 2011-04-27
    • 1970-01-01
    • 2016-06-25
    • 2018-11-15
    • 1970-01-01
    • 1970-01-01
    • 2016-12-18
    • 1970-01-01
    相关资源
    最近更新 更多