Created
January 3, 2019 13:42
-
-
Save cerealskill/d15f76937bfb557f41741cff2c7ee5f9 to your computer and use it in GitHub Desktop.
Custom Script for selenium-side-runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Autor: Leonardo Olmos | |
| echo "+-----------------------------------------------+"; | |
| echo "SELENIUM - Ejecutor de scripts (.slide) from IDE"; | |
| echo "+-----------------------------------------------+"; | |
| echo "Pasa como argumento el script generado por el IDE"; | |
| echo "Ej: ./start_selenium.sh script.slide"; | |
| echo "+-----------------------------------------------+"; | |
| echo "Dependencias: selenium-side-runner"; | |
| echo "+-----------------------------------------------+"; | |
| HOST=localhost | |
| N_WORKER=4 | |
| LOG="selenium.log"; | |
| #CMD='$(selenium-side-runner --server http://$HOST:4444/wd/hub $1 -w $N_WORKER --debug)'; | |
| #echo $CMD | tee $LOG; | |
| # echo $CMD >> selenium.log | |
| DATE=`date +%Y-%m-%d`; | |
| echo "Inicia Procesamiento..."; | |
| echo "Script procesado: $1"; | |
| echo "Fecha ejecuccion: $DATE"; | |
| echo "LOG: $LOG"; | |
| # Inicia Proceso del Script | |
| start=`date +%s`; | |
| echo "<-- Inicia Script -->" >> $LOG; | |
| echo "" >> $LOG; | |
| echo "Script Procesado: $1 " >> $LOG; | |
| echo "Fecha: $DATE " >> $LOG; | |
| echo "LOG Selenium ->" >> $LOG; | |
| selenium-side-runner --server http://$HOST:4444/wd/hub $1 -w $N_WORKER --debug &>> $LOG; | |
| echo "<-- End Script -->" >> $LOG; | |
| echo "" >> $LOG; | |
| end=`date +%s`; | |
| runtime=$((end-start)); | |
| echo "Duracion: $runtime seg"; | |
| echo "Fin Procesamiento...."; | |
| echo "+-----------------------------------------------+"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment