Python RobotFramework的安裝過程及應(yīng)用實(shí)戰(zhàn)教程
更新時(shí)間:2023年08月10日 10:40:08 作者:princewwj
這篇文章主要介紹了RobotFramework的安裝過程及應(yīng)用實(shí)戰(zhàn)教程,本文通過示例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
一、安裝python3.8.0
二、安裝wxPython
C:\>pip install -U wxPython Collecting wxPython Obtaining dependency information for wxPython from https://files.pythonhosted.org/packages/00/78/b11f255451f7a46fce2c96a0abe6aa8b31493c739ade197730511d9ba81a/wxPython-4.2.1-cp38-cp38-win_amd64.whl.metadata Downloading wxPython-4.2.1-cp38-cp38-win_amd64.whl.metadata (3.0 kB) Requirement already satisfied: pillow in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython) (10.0.0) Requirement already satisfied: six in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython) (1.16.0) Requirement already satisfied: numpy in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython) (1.24.4) Downloading wxPython-4.2.1-cp38-cp38-win_amd64.whl (18.1 MB) ---------------------------------------- 18.1/18.1 MB 22.0 kB/s eta 0:00:00 Installing collected packages: wxPython Successfully installed wxPython-4.2.1 C:\>
三、安裝robotframework
C:\>pip install robotframework Collecting robotframework Obtaining dependency information for robotframework from https://files.pythonhosted.org/packages/b5/f0/3338803e955926c7826cfe6738ed99db1f76c3a86defca2c33228b12119a/robotframework-6.1.1-py3-none-any.whl.metadata Downloading robotframework-6.1.1-py3-none-any.whl.metadata (7.5 kB) Downloading robotframework-6.1.1-py3-none-any.whl (699 kB) ---------------------------------------- 699.1/699.1 kB 165.7 kB/s eta 0:00:00 Installing collected packages: robotframework Successfully installed robotframework-6.1.1 C:\>
四、安裝robotframework-ride
C:\>pip install robotframework-ride Collecting robotframework-ride Downloading robotframework-ride-2.0.6.zip (1.8 MB) ---------------------------------------- 1.8/1.8 MB 40.3 kB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting PyPubSub (from robotframework-ride) Downloading Pypubsub-4.0.3-py3-none-any.whl (61 kB) ---------------------------------------- 61.4/61.4 kB 27.3 kB/s eta 0:00:00 Collecting Pygments (from robotframework-ride) Obtaining dependency information for Pygments from https://files.pythonhosted.org/packages/43/88/29adf0b44ba6ac85045e63734ae0997d3c58d8b1a91c914d240828d0d73d/Pygments-2.16.1-py3-none-any.whl.metadata Downloading Pygments-2.16.1-py3-none-any.whl.metadata (2.5 kB) Collecting psutil (from robotframework-ride) Downloading psutil-5.9.5-cp36-abi3-win_amd64.whl (255 kB) ---------------------------------------- 255.1/255.1 kB 40.3 kB/s eta 0:00:00 Requirement already satisfied: wxPython in c:\rtkapp\python-3.8.0\lib\site-packages (from robotframework-ride) (4.2.1) Collecting Pywin32 (from robotframework-ride) Downloading pywin32-306-cp38-cp38-win_amd64.whl (9.4 MB) ---------------------------------------- 9.4/9.4 MB 26.1 kB/s eta 0:00:00 Requirement already satisfied: pillow in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython->robotframework-ride) (10.0.0) Requirement already satisfied: six in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython->robotframework-ride) (1.16.0) Requirement already satisfied: numpy in c:\rtkapp\python-3.8.0\lib\site-packages (from wxPython->robotframework-ride) (1.24.4) Downloading Pygments-2.16.1-py3-none-any.whl (1.2 MB) ---------------------------------------- 1.2/1.2 MB 23.9 kB/s eta 0:00:00 Building wheels for collected packages: robotframework-ride Building wheel for robotframework-ride (pyproject.toml) ... done Created wheel for robotframework-ride: filename=robotframework_ride-2.0.6-py3-none-any.whl size=1436920 sha256=84f50be902d3631402b7f54e9e0c58b725733a24bc54602b6f19da95efba6f93 Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\3d\b3\48\bb3eece94032ff981debf3b9a25c7a81356af7190c8f7773cf Successfully built robotframework-ride Installing collected packages: Pywin32, PyPubSub, Pygments, psutil, robotframework-ride Successfully installed PyPubSub-4.0.3 Pygments-2.16.1 Pywin32-306 psutil-5.9.5 robotframework-ride-2.0.6 C:\>
五、安裝robotframework-selenium2library
C:\>pip install robotframework-selenium2library Collecting robotframework-selenium2library Using cached robotframework_selenium2library-3.0.0-py2.py3-none-any.whl (6.2 kB) Collecting robotframework-seleniumlibrary>=3.0.0 (from robotframework-selenium2library) Obtaining dependency information for robotframework-seleniumlibrary>=3.0.0 from https://files.pythonhosted.org/packages/e9/3d/1a72ef735c70e40c27d1b8685b35431a723f6475a7698ee17feb726382ca/robotframework_seleniumlibrary-6.1.1-py2.py3-none-any.whl.metadata Using cached robotframework_seleniumlibrary-6.1.1-py2.py3-none-any.whl.metadata (15 kB) Collecting selenium>=4.3.0 (from robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for selenium>=4.3.0 from https://files.pythonhosted.org/packages/10/56/8288d1813a68c1e0638515dbb777fce6d87d0d240e683216f956145310e6/selenium-4.11.2-py3-none-any.whl.metadata Using cached selenium-4.11.2-py3-none-any.whl.metadata (7.0 kB) Requirement already satisfied: robotframework>=4.1.3 in c:\rtkapp\python-3.8.0\lib\site-packages (from robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) (6.1.1) Collecting robotframework-pythonlibcore>=3.0.0 (from robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for robotframework-pythonlibcore>=3.0.0 from https://files.pythonhosted.org/packages/af/2b/88274849d9ea6cdddbbdf40e5262d92fdd7e20026026c49369c07d7f62d5/robotframework_pythonlibcore-4.2.0-py2.py3-none-any.whl.metadata Using cached robotframework_pythonlibcore-4.2.0-py2.py3-none-any.whl.metadata (6.0 kB) Collecting urllib3[socks]<3,>=1.26 (from selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for urllib3[socks]<3,>=1.26 from https://files.pythonhosted.org/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03adecf339c7bc30656b37/urllib3-2.0.4-py3-none-any.whl.metadata Using cached urllib3-2.0.4-py3-none-any.whl.metadata (6.6 kB) Collecting trio~=0.17 (from selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for trio~=0.17 from https://files.pythonhosted.org/packages/a3/dd/b61fa61b186d3267ef3903048fbee29132963ae762fb70b08d4a3cd6f7aa/trio-0.22.2-py3-none-any.whl.metadata Using cached trio-0.22.2-py3-none-any.whl.metadata (4.7 kB) Collecting trio-websocket~=0.9 (from selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for trio-websocket~=0.9 from https://files.pythonhosted.org/packages/a5/a6/06e2373f95c12e9e8f6b910a76c86e375348ead77ab476230640666310fb/trio_websocket-0.10.3-py3-none-any.whl.metadata Using cached trio_websocket-0.10.3-py3-none-any.whl.metadata (4.6 kB) Collecting certifi>=2021.10.8 (from selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for certifi>=2021.10.8 from https://files.pythonhosted.org/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl.metadata Using cached certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB) Collecting attrs>=20.1.0 (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached attrs-23.1.0-py3-none-any.whl (61 kB) Collecting sortedcontainers (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Collecting idna (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached idna-3.4-py3-none-any.whl (61 kB) Collecting outcome (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached outcome-1.2.0-py2.py3-none-any.whl (9.7 kB) Collecting sniffio (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached sniffio-1.3.0-py3-none-any.whl (10 kB) Collecting cffi>=1.14 (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached cffi-1.15.1-cp38-cp38-win_amd64.whl (178 kB) Collecting exceptiongroup>=1.0.0rc9 (from trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Obtaining dependency information for exceptiongroup>=1.0.0rc9 from https://files.pythonhosted.org/packages/fe/17/f43b7c9ccf399d72038042ee72785c305f6c6fdc6231942f8ab99d995742/exceptiongroup-1.1.2-py3-none-any.whl.metadata Using cached exceptiongroup-1.1.2-py3-none-any.whl.metadata (6.1 kB) Collecting wsproto>=0.14 (from trio-websocket~=0.9->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached wsproto-1.2.0-py3-none-any.whl (24 kB) Collecting pysocks!=1.5.7,<2.0,>=1.5.6 (from urllib3[socks]<3,>=1.26->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached PySocks-1.7.1-py3-none-any.whl (16 kB) Collecting pycparser (from cffi>=1.14->trio~=0.17->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting h11<1,>=0.9.0 (from wsproto>=0.14->trio-websocket~=0.9->selenium>=4.3.0->robotframework-seleniumlibrary>=3.0.0->robotframework-selenium2library) Using cached h11-0.14.0-py3-none-any.whl (58 kB) Using cached robotframework_seleniumlibrary-6.1.1-py2.py3-none-any.whl (96 kB) Using cached robotframework_pythonlibcore-4.2.0-py2.py3-none-any.whl (10 kB) Downloading selenium-4.11.2-py3-none-any.whl (7.2 MB) ---------------------------------------- 7.2/7.2 MB 17.0 kB/s eta 0:00:00 Downloading certifi-2023.7.22-py3-none-any.whl (158 kB) ---------------------------------------- 158.3/158.3 kB 18.9 kB/s eta 0:00:00 Downloading trio-0.22.2-py3-none-any.whl (400 kB) ---------------------------------------- 400.2/400.2 kB 25.7 kB/s eta 0:00:00 Downloading trio_websocket-0.10.3-py3-none-any.whl (17 kB) Downloading exceptiongroup-1.1.2-py3-none-any.whl (14 kB) Downloading urllib3-2.0.4-py3-none-any.whl (123 kB) ---------------------------------------- 123.9/123.9 kB 25.6 kB/s eta 0:00:00 Installing collected packages: sortedcontainers, urllib3, sniffio, robotframework-pythonlibcore, pysocks, pycparser, idna, h11, exceptiongroup, certifi, attrs, wsproto, outcome, cffi, trio, trio-websocket, selenium, robotframework-seleniumlibrary, robotframework-selenium2library Successfully installed attrs-23.1.0 certifi-2023.7.22 cffi-1.15.1 exceptiongroup-1.1.2 h11-0.14.0 idna-3.4 outcome-1.2.0 pycparser-2.21 pysocks-1.7.1 robotframework-pythonlibcore-4.2.0 robotframework-selenium2library-3.0.0 robotframework-seleniumlibrary-6.1.1 selenium-4.11.2 sniffio-1.3.0 sortedcontainers-2.4.0 trio-0.22.2 trio-websocket-0.10.3 urllib3-2.0.4 wsproto-1.2.0 C:\>
六、如下圖鼠標(biāo)雙擊打開ride.py
七、RIDE打開后的界面
至此安裝成功
到此這篇關(guān)于RobotFramework的安裝過程及應(yīng)用舉例的文章就介紹到這了,更多相關(guān)RobotFramework安裝內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Python range、enumerate和zip函數(shù)用法詳解
這篇文章主要介紹了Python range、enumerate和zip函數(shù)用法詳解,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2019-09-09Django權(quán)限機(jī)制實(shí)現(xiàn)代碼詳解
這篇文章主要介紹了Django權(quán)限機(jī)制實(shí)現(xiàn)代碼詳解,分享了相關(guān)代碼示例,小編覺得還是挺不錯(cuò)的,具有一定借鑒價(jià)值,需要的朋友可以參考下2018-02-02Python3自動(dòng)簽到 定時(shí)任務(wù) 判斷節(jié)假日的實(shí)例
今天小編就為大家分享一篇Python3自動(dòng)簽到 定時(shí)任務(wù) 判斷節(jié)假日的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-11-11