【问题标题】:Testcafe redirect with tokenTestcafe 使用令牌重定向
【发布时间】:2021-03-09 21:36:44
【问题描述】:

我在 Testcafe 中进行了一些自动化操作,我得到了 Intercept HTTP Requests 的文档,并 Create a Custom Request Hook,我的疑问是,我可以发送一个标头吗到请求我尝试导航的 URL 的“get”,我有令牌,但我不知道如何将标头传递给制作 web 应用程序的“get”。

【问题讨论】:

    标签: authentication testing automated-tests token testcafe


    【解决方案1】:

    您可以在RequestHookonRequest 方法中设置附加标头。导航到包含 TestCafe 示例的以下部分:Control HTTP Requests。 “设置自定义引用者”示例展示了如何在测试期间为指定请求设置自定义 Referer 标头。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-15
      • 2020-08-01
      • 2017-02-25
      • 1970-01-01
      • 1970-01-01
      • 2023-01-19
      • 2021-11-19
      相关资源
      最近更新 更多