robotframework - Robot Framework using proxy -


i have curl call:

curl -k -i -x -h "cache-control: no-cache" --proxy1.0 "localhost:7070" "https://www.google.com" 

i trying make call robot framework can test same elements. got far:

***settings*** library          collections library          requestslibrary  ***variables*** ${url}              http://www.google.com ${proxy}            localhost:7070 ${headers}=         create dictionary     cache-control no-cache  ***test cases*** requests    create session                      google      ${url}      ${headers}      ${proxy}    ${resp}=                            request        google  /    should equal strings          ${resp.status_code}     200 

i still error:

valueerror: need more 1 value unpack 

any idea going wrong?

the problem here:

***variables*** ... ${headers}=         create dictionary     cache-control no-cache 

you cannot call keywords create dictionary in variables table. above code setting ${headers} string "create dictionary cache-control no-cache".

starting version 2.9 of robot framework there direct support dictionaries using ampersand rather dollar sign variables. can specify values using <key>=<value> syntax. example:

*** variables *** &{headers}    cache-control=no-cache 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -