【问题标题】:selenium - javascript - how to open a different url?selenium - javascript - 如何打开不同的网址?
【发布时间】:2018-11-04 21:53:23
【问题描述】:

我有 the_id 31 岁

如何在 selenium 中使用 js 访问该网址?

我一直在尝试:

store # not sure command to use here.  Not "open" as that open up this window.
javascript{window.location.href = "/districts/${the_id}"}    
dummy

但是${the_id} 没有被插值。

【问题讨论】:

  • 是的,没错。

标签: javascript selenium href selenium-ide


【解决方案1】:

原来是插值OK

只是日志显示了 ${the_id},但 url 使用了实际值。

当我在测试错误页面时很难看到,这使得实际的 url 很难看到。

【讨论】:

    猜你喜欢
    • 2015-10-16
    • 1970-01-01
    • 2015-09-14
    • 2018-11-13
    • 1970-01-01
    • 1970-01-01
    • 2017-12-12
    • 2013-09-01
    • 1970-01-01
    相关资源
    最近更新 更多