Tools Needed:
1. install python and set environment variables
https://www.python.org/downloads/
2. install robotframwork and selenium throught pip tools
pip install robotframework
pip install selenium
pip install robotframework-seleniumlibrary
pip install robotframework-selenium2library
3. install chromedriver with the chrome version you use.
https://chromedriver.chromium.org/download
Customized Keywork Library Setup
Need Copy MyRobotLib folder to python site-packages path.
C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Lib\site-packages
Customized Keyword "def I_Open_Browser_Visit_Url(self,url):" can be use in robot file as "I open browser ${url}"
Test Case:
*** Setting ***
Library MyRobotLib(ImportCustomized Keyword)
*** Variables ***
${acceptCookiesButton} //button[@title='Accept Cookies'] (The object or value to use data-driven, also can use python function to handle the data)
*** Test Cases ***
case1 Tags (Tag as Tags)
How to execute Case:
robot -G "@TagName" --outputdir "@reportDir" @ProjectPath
Report
Report will generate under report folder. html report is good for know the status of execution.