【问题标题】:i have an Excel of URL , One URL is redirecting to another how would i test it through Selenium webdriver我有一个 URL 的 Excel,一个 URL 正在重定向到另一个 URL 我将如何通过 Selenium webdriver 对其进行测试
【发布时间】:2015-07-14 06:34:17
【问题描述】:

我有一个 excel 的 URL,其中有 4 列,OLD t_id,Old URL 和 New t_id 和 new URL,我必须通过 selenium Web 驱动程序测试 URL 重定向。 请提出任何想法

【问题讨论】:

    标签: selenium webdriver


    【解决方案1】:

    使用@DataProvider 循环浏览您的excel 数据,从excel 中读取old_url 并使用driver.get() 导航到它,使用driver.getCurrentUrl() 获取新的重定向url 字符串。将其与 excel new_url 列中的字符串进行比较。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-22
      • 1970-01-01
      • 1970-01-01
      • 2016-01-10
      相关资源
      最近更新 更多