Robot Framework - Selenium Library Import Issue on Ride (Python 3.7)

拟墨画扇 提交于 2021-01-28 13:30:10

问题


I had some troubles to install selenium library at first, after I went trough some websites, I installed the library using the command pip install -U selenium on prompt command, however, after importing the library to Ride, the name appears in red as photos below shows

I looked into Lib (Ananconda3) folder to check if there was any folder related to Selenium and I found it out there, therefore, I dont understand why Ride is not importing it properly

Any help will be highly appreciate (ps. I dont know if it is relevant, but I'm using Windows 10)


回答1:


Selenium doesn't equal SeleniumLibrary.

You need to follow instalation instructions.

If you want to use selenium in RF, you need to install:

  • selenium => you have done it
  • SeleniumLibrary => you haven't done it, follow the instructions I linked, $ pip install -U robotframework-seleniumlibrary
  • RF => it seems (from the screen) you have done it, $ pip install -U robotframework

After these steps, you can import SeleniumLibrary in RF:

*** Settings ***
Library    SeleniumLibrary

and you should see no errors.



来源:https://stackoverflow.com/questions/62608831/robot-framework-selenium-library-import-issue-on-ride-python-3-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!