Skip to content

Commit

Permalink
continue updating tagui.cmd (runner for windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
kensoh authored Mar 17, 2017
1 parent a114cef commit f648592
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions src/tagui.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
@echo off
rem # SCRIPT FOR RUNNING TA.GUI FRAMEWORK ~ TEBEL.ORG #

rem enable windows for loop advanced flow control
Expand All @@ -7,13 +7,13 @@ setlocal enableextensions enabledelayedexpansion
if "%~1"=="" (
echo tagui: missing parameter^(s^) - use this syntax and below options to run ./tagui flow_filename option^(s^)
echo.
echo firefox - run on visible Firefox browser ^(first install Firefox, and SlimerJS - https://slimerjs.org^)
echo firefox - run on visible Firefox web browser instead of invisible browser ^(first install Firefox^)
echo report - generate a web report for easy sharing of run results ^(default is only a text log file^)
echo debug - show run-time backend messages from PhantomJS for detailed tracing and logging
echo quiet - run without output except for explicit output ^(echo / show / check / api / errors etc^)
echo test - professional testing using CasperJS assertions ^(TA.Gui dynamic tx^('selector'^) usable^)
echo.
echo TA.Gui is a tool for non-developers and business users to automate web apps - http://tebel.org
echo TA.Gui is a tool for non-developers and business users to automate web ~ http://tebel.org
echo.
exit /b 1
)
Expand All @@ -33,9 +33,25 @@ set "initial_dir=%cd%"
rem change current directory to TA.GUI directory
cd /d "%~dp0"

rem set local path to casperjs and environment path to phantomjs
set CASPERJS_EXECUTABLE="C:\TA.Gui\casperjs"
set PHANTOMJS_EXECUTABLE="C:\TA.Gui\phantomjs"



rem below 3 blocks dynamically set up dependencies paths for different setups
rem first set dependencies to local symbolic links (for manual installation)

rem symbolic links not applicable on windows, only done for macos and linux

rem then set to node.js dependencies if they exist (for npm install tagui)

if exist "%~dp0..\..\casperjs\bin\casperjs" set path=%~dp0..\..\casperjs\bin;%path%
if exist "%~dp0..\..\phantomjs-prebuilt\bin\phantomjs" set path=%~dp0..\..\phantomjs-prebuilt\bin;%path%
if exist "%~dp0..\..\slimerjs\src\slimerjs" set path=%~dp0..\..\slimerjs\src;%path%

rem finally set to packaged dependencies if they exist (for packaged installation)

if exist "%~dp0casperjs\bin\casperjs" set path=%~dp0casperjs\bin;%path%
if exist "%~dp0phantomjs\bin\phantomjs" set path=%~dp0phantomjs\bin;%path%
if exist "%~dp0slimerjs\slimerjs" set path=%~dp0slimerjs;%path%

rem check firefox parameter to run on visible firefox browser through slimerjs

Expand All @@ -57,14 +73,17 @@ rem $1 left out - filenames with spaces have issue when casperjs $params


rem initialise log file and set permissions to protect user data
type nul > "%flow_file%.log"
type nul > "%flow_file%".log

rem check if api call is made in automation flow file to set appropriate setting for phantomjs to work


rem check datatable csv file for batch automation





rem loop for managing multiple data sets in datatable


Expand All @@ -73,6 +92,7 @@ set tagui_error_code=0

rem parse automation flow file and check for initial parse error before calling casperjs
php -q tagui_parse.php "%flow_file%"
casperjs "%flow_file%".js

rem check report option to generate html automation log

Expand Down

1 comment on commit f648592

@kensoh
Copy link
Member Author

@kensoh kensoh commented on f648592 Mar 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of addressing #5

Please sign in to comment.