- Create Session osmhit ${HOST}
- Log Many ${auth_token_uri} @{data} ${data}
- ${resp}= Post Request osmhit ${auth_token_uri} data=${data} headers=${HEADERS}
- log ${resp}
- Pass Execution If ${resp.status_code} in ${success_status_code_list} Get Auth Token completed
- Set Suite Variable ${token_status_code} ${resp.status_code}
- ${access_token}= Get Value From Json ${resp.json()} $..id
- Set Test Variable ${access_token} ${access_token[0]}
- Set Test Variable ${token_response} ${resp}
- sleep 2s
+ Create Session osmhit ${HOST} disable_warnings=1
+ &{headers} Create Dictionary Content-Type=application/json Accept=application/json
+ &{data} Create Dictionary username=${osm_user} password=${osm_password} project-id=${osm_project}
+ ${resp}= Post On Session osmhit ${auth_token_uri} json=${data} headers=${headers}
+ Log ${resp}
+ Pass Execution If ${resp.status_code} in ${success_status_code_list} Get Auth Token completed
+ Set Suite Variable ${token_status_code} ${resp.status_code}
+ ${access_token}= Get Value From Json ${resp.json()} $..id
+ Set Test Variable ${access_token} ${access_token[0]}
+ Set Test Variable ${token_response} ${resp}
+ sleep 2s