Practice simple test automation with python. sample/ Folder contains examples that use UNAPEC's website in json and yaml.
- python 3.8
- selenium
- PyYaml
- Google, Firefox or any other webdriver Google Chrome webdriver
Just Download the python installer for your OS and install. In windows you might have to add the python installation dir to the PATH environment variable
Once python 3.8 is installed then run:
python -m pip install -U selenium
python -m pip install -U pyyaml
Download the webdriver (For this example just downloading the chrome webdriver will be OK) and put the executable in an easy to find directory. These executables must be added to the PATH on windows.
You need to have pyinstaller installed. If it's not installed install it with:
python -m pip install -U pyinstaller
Now just run the 'package.bat' script in windows or the 'package.sh' script for linux. Or, for the same effect run:
python -m PyInstaller main.py --onefile -n srpa.exe
srpa -i ./sample.json -b chrome
[ srpa ]
-h, --help
Muestra este texto de ayuda
-i, --input
Especifíca la ruta del archivo que contiene el script de automatización (requerido)
Tipos de entrada soportados: ['json', 'yml']
-b, --browser
Indica cual navegador se desea utilizar (default chrome)
Navegadores soportados: ['chrome', 'firefox', 'opera']
-d --driver
Indica cual librería se desea usar para manejar la automatización
Drivers soportados: ['selenium']
-p, --path
Indica la ruta de los binarios de webdriver
Por default se utilizan los encontrados en el PATH
See the sample scripts in sample/