Hello,
I am trying to use the Robot Framework’s with Borwserstack and I am facing a difficulty. I’m using the REST API that the documentation goes through:
curl -u “username:accesskey”
-X PUT “https://api-cloud.browserstack.com/app-automate/sessions/session_id.json”
-H “Content-Type: application/json”
-d ‘{“status”:“failed”, “reason”:“Element not found on the login page”}’
But I get the following error “HTTPError: 401 Client Error: Unauthorized for url” This is the code in robot framework:
Set Status Session
${auth} = Set Variable ${BS_USERNAME}:${BS_ACCESSKEY}
${url} = Set Variable ${BS_MARK_TEST_STATUS}
${headers} Create Dictionary auth=Basic ${auth}
Create Session browserstack ${url} ${headers}
${response} = PUT browserstack /
Log ${response.json()}
Log Response Status Code: ${response.status_code}
Does anyone know how to resolve? Thanks.