问题
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