【问题标题】:get response header robot framework获取响应头机器人框架
【发布时间】:2023-04-01 20:13:01
【问题描述】:

我正在尝试在机器人框架中获取名为 com.coradiant.appvis 的响应标头 没有资源可以提供帮助,这是我的代码

*** Settings ***
Library            HttpLibrary.HTTP
Test Setup      Create HTTP Context     ${HOST}

*** Variables ***
${PORT}         80
${HOST}       http://vw-tlv-idnqa31${PORT}/EventsApps/EventsApps/WebForm.aspx
${APPVIS_HEADER}


*** Test Cases ***
Checking Appvis test
    Get the appvis response header

*** Keywords ***
Get the appvis response header
${APPVIS_HEADER} =        get response header   com.coradiant.appvis
Log     ${APPVIS_HEADER}

【问题讨论】:

  • 日志消息实际上显示了什么?

标签: http http-headers robotframework


【解决方案1】:

您必须先提出请求,然后才能获取标头。您可以使用 GET 关键字发出请求,假设您需要 GET 请求的标头。

【讨论】:

    猜你喜欢
    • 2016-06-09
    • 2020-12-07
    • 1970-01-01
    • 2018-07-17
    • 2015-11-21
    • 1970-01-01
    • 1970-01-01
    • 2021-06-10
    • 2015-06-15
    相关资源
    最近更新 更多