0%

RobotFramework问题集

Importing test library ‘Selenium2Library’ failed: ImportError: No module named ‘Selenium2Library’

安装seleniumlibrary时需要注意有两个包,robotframework-seleniumlibraryrobotframework-selenium2library

1
2
3
pip install robotframework robotframework-seleniumlibrary
# or
pip install robotframework robotframework-selenium2library

WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

找不到geckodriver,使用brew install geckodriver命令安装。


SessionNotCreatedException: Message: Unable to find a matching set of capabilities

驱动firefox浏览器失败,可能原因是本地没有firefox浏览器,使用Chrome替代。


WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Chrome浏览器驱动失败,使用brew cask install chromedriver安装驱动。