Robotframework-browser httpcredentials uncreatable

Hi @dumontjudea2
same problem fixed for me following ‘Example as literal’ in the latest documentation bellow :

HttpCredentials (TypedDict)

Documentation

Sets the credentials for http basic-auth.

Can be defined as robot dictionary or as string literal. Does not reveal secrets in Robot Framework logs. Instead, username and password values are resolved internally. Please note that if enable_playwright_debug is enabled in the library import, secret will be always visible as plain text in the playwright debug logs, regardless of the Robot Framework log level.

Example as literal:

${pwd} = Set Variable 1234
${username} = Set Variable admin
New Context
… httpCredentials={‘username’: ‘$username’, ‘password’: ‘$pwd’}

Example as robot variable

***Variables ***
${username}= admin
${pwd}= 1234
${credentials}= username=$username password=$pwd

***Keywords ***
Open Context
New Context
… httpCredentials=${credentials}

Dictionary Structure

{
‘username’:
‘password’:
}

Converted Types

  • string
  • Mapping

Usages

  • New Context
  • New Persistent Context

src : Browser (marketsquare.github.io)