在Windows环境下,可以通过以下步骤安装Robot Framework RIDE:
-
安装Python
首先,需要在Windows环境下安装Python。建议使用Python 3.x版本,可以从官方网站下载并安装:https://www.python.org/downloads/windows/
-
安装wxPython
RIDE使用wxPython作为GUI工具包。可以通过以下命令来安装wxPython:
pip install -U wxPython
-
安装Robot Framework
可以通过以下命令来安装Robot Framework:
pip install robotframework
-
安装Robot Framework RIDE
安装完成Python、wxPython以及Robot Framework之后,可以通过以下命令来安装RIDE:
pip install robotframework-ride
注意:如果在安装RIDE时出现“Microsoft Visual C++ 14.0 is required”的提示,则需要安装Microsoft Visual C++ 14.0或更高版本。可以访问以下网址下载并安装:https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
启动RIDE
安装成功后,通过以下命令启动RIDE:
python -m robotide.__init__
或者,也可以通过命令行界面在任意目录下输入“ride.py”启动RIDE:
ride.py
以上就是在Windows环境下安装Robot Framework RIDE的步骤。
(AutoRobot230303) PS D:\code\AutoRobot> allure open allure-report
Starting web server...
2023-07-05 16:37:07.699:INFO::main: Logging initialized @289ms to org.eclipse.jetty.util.log.StdErrLog
Server started at <http://192.168.7.97:52539/>. Press <Ctrl+C> to exit
终止批处理操作吗(Y/N)? y
(AutoRobot230303) PS D:\code\AutoRobot> pip install -U wxPython
Collecting wxPythonDownloading wxPython-4.2.1-cp311-cp311-win_amd64.whl (17.8 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.8/17.8 MB 58.5 kB/s eta 0:00:00
Requirement already satisfied: pillow in d:\code\autorobot230303\lib\site-packages (from wxPython) (9.4.0)
Requirement already satisfied: six in d:\code\autorobot230303\lib\site-packages (from wxPython) (1.16.0)
Requirement already satisfied: numpy in d:\code\autorobot230303\lib\site-packages (from wxPython) (1.24.2)
Successfully installed wxPython-4.2.1
[notice] To update, run: python.exe -m pip install --upgrade pipDownloading robotframework-ride-2.0.6.zip (1.8 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 45.9 kB/s eta 0:00:00
Collecting PyPubSubDownloading Pypubsub-4.0.3-py3-none-any.whl (61 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.4/61.4 kB 204.5 kB/s eta 0:00:00
Collecting PygmentsDownloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 146.6 kB/s eta 0:00:00
Collecting psutilDownloading psutil-5.9.5-cp36-abi3-win_amd64.whl (255 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 255.1/255.1 kB 127.4 kB/s eta 0:00:00
Requirement already satisfied: wxPython in d:\code\autorobot230303\lib\site-packages (from robotframework-ride) (4.2.1)
Collecting Pywin32Downloading pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 293.7 kB/s eta 0:00:00
Requirement already satisfied: pillow in d:\code\autorobot230303\lib\site-packages (from wxPython->robotframework-ride) (9.4.0)
Requirement already satisfied: six in d:\code\autorobot230303\lib\site-packages (from wxPython->robotframework-ride) (1.16.0)
Requirement already satisfied: numpy in d:\code\autorobot230303\lib\site-packages (from wxPython->robotframework-ride) (1.24.2)
Building wheels for collected packages: robotframework-rideBuilding wheel for robotframework-ride (setup.py) ... doneCreated wheel for robotframework-ride: filename=robotframework_ride-2.0.6-py3-none-any.whl size=1436889 sha256=cf9e4c9c98f9688eeb18fdef1114733235c685b8e7a7e8449df3b898cec6d893Stored in directory: c:\users\songpy\appdata\local\pip\cache\wheels\97\81\3a\0d4dead6d6fada695df4791c0d018e8189f7bd912d49af2402
Successfully built robotframework-ride
Installing collected packages: Pywin32, PyPubSub, Pygments, psutil, robotframework-ride
Successfully installed PyPubSub-4.0.3 Pygments-2.15.1 Pywin32-306 psutil-5.9.5 robotframework-ride-2.0.6[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(AutoRobot230303) PS D:\code\AutoRobot> python -m robotide.__init__