Robot Framework 小坑記錄

一VII一發表於2020-11-09
一、安裝robotframework-redislibrary:
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
pip install redis
pip install robotframework-redislibrary
ERROR: Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
pip install --ignore-installed pyparsing
二、在setup中執行多個關鍵字

run keywords|關鍵字一|引數一|引數二|AND|關鍵字二|引數一|引數二

三、在setup中設定變數

set suite variable | ${url} | http://0.0.0.0:8002 | children=true

四、在使用者關鍵字中設定引數(字典型別需要放在最後且不用設定預設值)

${uri} | ${params}=’’ | &{cookies}

五、需要模擬ajax請求時,在heards上新增

X-Requested-With=XMLHttpRequest

六、None 變數

${null}==None

七、使用數字作為字典的value

r e s u l t c r e a t e d i c t i o n a r y i d = {result} create dictionary id= resultcreatedictionaryid={5}

八、多個tag控制執行

nocookies & level1

相關文章