Skip to content

Commit

Permalink
#386 - TagUI v5.0 - Visual Automation Release (major upgrades for Ope…
Browse files Browse the repository at this point in the history
…nCV & Tesseract) (#388)

Sending some PR(s) on a new release of TagUI. The goal will be to create packaged installations of the changes, bug fixes and enhancements since August 2018, as well as the corresponding documentation updates. Notable changes include PRs from users on Japanese, German and French (removed names otherwise will spam them with notification) TagUI translation engine (prior to that only English and Chinese is vetted manually by me).

And the recent PRs I sent on #350 enabling dynamic variables in live mode, #352 enabling datatable in test mode, #371 keyboard step for sending complex keystrokes to the screen, #369 mouse step for low-level mouse down and up actions on the screen, #366 enabling interacting with UI elements by specifying their (x,y) coordinates, #362 mouse_xy() / mouse_x() / mouse_y() helper functions, #383 graceful error handling for unexpected and unhandled errors, #385 enhancement to report option that has auditing and tracking capability, #387 ability to disable generation of .log .raw .js files by default

Last, and most importantly, migration from SikuliX v1.1.3 to SikuliX v1.1.4. This is because in between the 2 versions there is a move from much older OpenCV and Tesseract to major new versions. Performance and accuracy (image finding and OCR from image to text) should improve. However, I would imagine the greater accuracy may cause the automation results of some use cases to be different, as more accurate text gets retrieved and more accurate image gets found. Ie, scripting base on somewhat imperfect anchors and placeholders can sometimes break when the anchors and placeholders improve and are no longer the same, if you know what I mean.

Due to this reason, this release will be a major release to v5.0 as users, particularly users of visual automation, are encouraged to validate that the new release with SikuliX v1.1.4 is still giving the kind of automation results they want, or make modifications if needed, before they migrate to the new TagUI release.

---

In addition, #387 disable logging and generation of .raw .js .log files after each run

Sending a PR that lets users switch the logging off by default.

The default TagUI behaviour is generating .raw (expansion of modules and subscripts), .js (generated JavaScript code), .log (log of what happened during the automation. This feature would probably be useful by default for developers. For business users, probably they would not be close enough to the nitty gritty of files to bother with these files.

However, there may be a use scenario where such logs are explicitly not wanted. Whether for the minimalist movement, save environment with non-excessive use of non-necessary storage or perhaps for privacy and security reasons.

With this PR, users only need to put a file tagui_no_logging (can be empty or has contents) in the tagui/src folder. When this file exists, TagUI will delete the .js .raw .log files after executing the script. Thus when `tagui flow` is run there won't be flow.js flow.log flow.raw after execution.
  • Loading branch information
kensoh authored Apr 8, 2019
1 parent b8fbd97 commit 1ad32b7
Show file tree
Hide file tree
Showing 12 changed files with 1,158 additions and 165 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# exclude folders for packaged installation
/src/casperjs/*
/src/phantomjs/*
/src/sikulix/*
/src/slimerjs/*
/src/php/*
/src/unx/*
Expand Down Expand Up @@ -34,6 +35,9 @@
# exclude audit report csv file
/src/tagui_report.csv

# exclude tagui_no_logging flag
/src/tagui_no_logging

# exclude translation temp build files
/src/languages/build.js
/src/languages/build.log
Expand Down
259 changes: 158 additions & 101 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tagui",
"version": "4.1.0",
"description": "CLI tool for digital process automation (RPA)",
"version": "5.0.0",
"description": "Command-line tool for digital process automation (RPA)",
"keywords": [
"tagui"
],
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"name": "TagUI Web Automation", "short_name": "TagUI Tool", "version": "4.1.0",
"name": "TagUI Web Automation", "short_name": "TagUI Tool", "version": "5.0.0",
"description": "Create TagUI automation flows by recording your actions",
"homepage_url": "https://github.com/kelaberetiv/TagUI",
"browser_action": {
Expand Down
6 changes: 3 additions & 3 deletions src/chrome/recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,12 @@ TestRecorder.ContextMenu.prototype.build = function(t, x, y) {

menu.appendChild(this.item("Inspect element", this.doInspectElement));
menu.appendChild(this.item("Note down element", this.doNoteDownElement));
menu.appendChild(this.item("Move cursor to element", this.doMoveCursorToElement));
menu.appendChild(this.item("Fetch element text", this.doFetchElementText));
menu.appendChild(this.item("Print element text", this.doPrintElementText));
menu.appendChild(this.item("Read element text", this.doFetchElementText));
menu.appendChild(this.item("Show element text", this.doPrintElementText));
menu.appendChild(this.item("Save element text", this.doSaveElementText));
menu.appendChild(this.item("Save webpage screenshot", this.doScreenShot));
menu.appendChild(this.item("Save element screenshot", this.doElementScreenShot));
menu.appendChild(this.item("Hover cursor at element", this.doMoveCursorToElement));
menu.appendChild(this.item("Wait for a few seconds", this.doExplicitWait));
menu.appendChild(this.item("Close shortcuts menu", this.cancel));
// menu.appendChild(this.item("Cancel the last step", this.doCancelLastStep));
Expand Down
4 changes: 2 additions & 2 deletions src/languages/build.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
language,id,ja,ko,ru,tl,vi,th,hi,ta,bn,pt,fr,de,es,it,pl,hu,sr,ro
#,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
language,id,ko,ru,tl,vi,th,hi,ta,bn,pt,es,it,pl,hu,sr,ro
95 changes: 47 additions & 48 deletions src/media/RPA Workshop.md

Large diffs are not rendered by default.

Binary file modified src/media/flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/media/flowchart.scap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<Alignment>Center</Alignment>
<Border Style="Square"></Border>
</Appearance>
<String>instantly convert flow from different native natural languages into working JavaScript web automation code
<String>instantly convert flow from different native natural languages into working JavaScript
UI automation code
(with live mode to test steps or JS code)</String>
</Note>
<Note ID="25" FontSize="9.0" Position="267.0,260.0" Width="128.0">
Expand Down Expand Up @@ -204,7 +205,7 @@
<TextColor>1.0 1.0 1.0</TextColor>
<Fill>0.314662 0.314653 0.314658</Fill>
</Appearance>
<String>v4.0 </String>
<String>v5.0 </String>
<Formatting>
<FormatRange Bold="Yes">0,6</FormatRange>
</Formatting>
Expand Down
917 changes: 917 additions & 0 deletions src/media/v5.0_release.md

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions src/tagui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ chrome_command="google-chrome"

if [ -z "$1" ]
then
echo "tagui v4.1.0: use following syntax and below options to run ./tagui flow_filename option(s)"
echo "tagui v5.0.0: use following options and this syntax to run - ./tagui flow_filename option(s)"
echo
echo "chrome - run on visible Chrome web browser instead of invisible PhantomJS (first install Chrome)"
echo "headless - run on invisible Chrome web browser instead of default PhantomJS (first install Chrome)"
Expand Down Expand Up @@ -271,8 +271,9 @@ python -u tagui_py/tagui_py.py >> tagui_py/tagui_py.log 2>&1 &
fi

# start sikuli process if integration file is created during parsing
if [ -f "tagui.sikuli/tagui_sikuli.in" ]; then echo "[starting sikuli process]" | tee -a "$1".log
tagui.sikuli/runsikulix -r tagui.sikuli -d 3 >> tagui.sikuli/tagui.log 2>&1 &
if [ -f "tagui.sikuli/tagui_sikuli.in" ]; then
# echo "[starting sikuli process]" | tee -a "$1".log
java -jar sikulix/sikulix.jar -r tagui.sikuli -d 3 >> tagui.sikuli/tagui.log 2>&1 &
fi

# start chrome processes if integration file is created during parsing
Expand Down Expand Up @@ -349,6 +350,13 @@ if [ -s "$1".log ] && [ "$tagui_html_report" == true ]; then php -q tagui_report
# check upload option to upload result to hastebin.com
if [ -s "$1".log ] && [ "$tagui_upload_result" == true ]; then ./tagui samples/8_hastebin quiet "$1"; fi

# remove logs if tagui_no_logging exists
if [ -f tagui_no_logging ]; then
if [ -f "$1".raw ]; then rm "$1".raw; fi
if [ -f "$1".log ]; then rm "$1".log; fi
if [ -f "$1".js ]; then rm "$1".js; fi
fi

# change back to initial directory where tagui is called
cd "$initial_dir"

Expand Down
13 changes: 10 additions & 3 deletions src/tagui.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rem enable windows for loop advanced flow control
setlocal enableextensions enabledelayedexpansion

if "%~1"=="" (
echo tagui v4.1.0: use following syntax and below options to run - tagui flow_filename option^(s^)
echo tagui v5.0.0: use following options and this syntax to run - tagui flow_filename option^(s^)
echo.
echo chrome - run on visible Chrome web browser instead of invisible PhantomJS ^(first install Chrome^)
echo headless - run on invisible Chrome web browser instead of default PhantomJS ^(first install Chrome^)
Expand Down Expand Up @@ -563,8 +563,8 @@ if exist "tagui_py\tagui_py.in" (

rem start sikuli process if integration file is created during parsing
if exist "tagui.sikuli\tagui_sikuli.in" (
echo [starting sikuli process] | tee -a "%flow_file%.log"
start /min cmd /c tagui.sikuli\runsikulix -r tagui.sikuli -d 3 2^>^&1 ^| tee -a tagui.sikuli\tagui.log
rem echo [starting sikuli process] | tee -a "%flow_file%.log"
start /min cmd /c java -jar sikulix\sikulix.jar -r tagui.sikuli -d 3 2^>^&1 ^| tee -a tagui.sikuli\tagui.log
)

rem start chrome processes if integration file is created during parsing
Expand Down Expand Up @@ -667,6 +667,13 @@ rem set flow_file to blank or the variable will break that tagui call
tagui samples\8_hastebin quiet "!tmp_flow_file!"
)

rem remove logs if tagui_no_logging exists
if exist "tagui_no_logging" (
if exist "%flow_file%.raw" del "%flow_file%.raw"
if exist "%flow_file%.log" del "%flow_file%.log"
if exist "%flow_file%.js" del "%flow_file%.js"
)

rem change back to initial directory where tagui is called
cd /d "%initial_dir%"

Expand Down

0 comments on commit 1ad32b7

Please sign in to comment.