Skip to content

Commit

Permalink
v4.1 - introduce variable (#241)
Browse files Browse the repository at this point in the history
various doc improvements, minor updates and introduction of `variable` to denote use of variable where text is expected. backward compatible with old syntax '+variable+'
  • Loading branch information
kensoh committed Aug 19, 2018
1 parent 280b6bc commit 26616d4
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ download https://admin.typeform.com/xxx to report.csv
</details>

# Set Up
TagUI is in v4.0 - it unzips and runs on macOS, Linux, Windows ([link to release notes](https://github.com/kelaberetiv/TagUI/releases))
TagUI is in v4.1 - it unzips and runs on macOS, Linux, Windows ([link to release notes](https://github.com/kelaberetiv/TagUI/releases))

**Tip** - to try [cutting edge version](https://github.com/kelaberetiv/TagUI/compare/v4.0.0...master) with the latest features, [download master.zip](https://github.com/kelaberetiv/TagUI/archive/master.zip) to overwrite an existing packaged installation (be sure to manually select and move the folders & files inside master.zip's TagUI-master/src folder to replace your existing tagui/src folder, otherwise some OSes will delete existing target folders that are missing from source folder)
**Tip** - to try [cutting edge version](https://github.com/kelaberetiv/TagUI/compare/v4.1.0...master) with the latest features, [download master.zip](https://github.com/kelaberetiv/TagUI/archive/master.zip) to overwrite an existing packaged installation (be sure to manually select and move the folders & files inside master.zip's TagUI-master/src folder to replace your existing tagui/src folder, otherwise some OSes will delete existing target folders that are missing from source folder)

### PACKAGED INSTALLATION
TagUI is easy to use right away - no setup is needed, in most environments all required dependencies are packaged in
Expand Down Expand Up @@ -437,7 +437,7 @@ Flow Sample |Purpose

Basic Step|Parameters (separator in bold)|Purpose
:---------|:-----------------------------|:------
http(s)://|just enter full url of webpage ('+variable+' for variable)|go to specified webpage
http(s)://|just enter full url of webpage (\`variable\` for variable)|go to specified webpage
click|element to click|click on an element
rclick|element to right-click|right-click on an element
dclick|element to double-click|double-click on an element
Expand All @@ -457,7 +457,7 @@ tagui|relative or absolute filename (see MODULES section)|run another tagui flow
ask|question or instruction for user (reply stored in ask_result)|ask user for input
live|try steps or code interactively for Chrome / visual automation|enter live mode ([Firefox not yet](https://github.com/laurentj/slimerjs/issues/639))

**Tip** - to use variables where text is expected, '+variable+' can be used. XPath is an expressive way to identify web elements. If you know xpath and use xpath for element identifier, use double quotes for text //\*[@title="Login"]
**Tip** - to use variables where text is expected, \`variable\` can be used. XPath is an expressive way to identify web elements. If you know xpath and use xpath for element identifier, use double quotes for text //\*[@title="Login"]

<details>
<summary>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tagui",
"version": "4.0.5",
"version": "4.1.0",
"description": "CLI 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.0.5",
"name": "TagUI Web Automation", "short_name": "TagUI Tool", "version": "4.1.0",
"description": "Create TagUI automation flows by recording your actions",
"homepage_url": "https://github.com/kelaberetiv/TagUI",
"browser_action": {
Expand Down
4 changes: 2 additions & 2 deletions src/media/RPA Workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ The recording is not foolproof (for example, the underlying recording engine can

Basic Step|Parameters (separator in bold)|Purpose
:---------|:-----------------------------|:------
http(s)://|just enter full url of webpage ('+variable+' for variable)|go to specified webpage
http(s)://|just enter full url of webpage (\`variable\` for variable)|go to specified webpage
click|element to click|click on an element
rclick|element to right-click|right-click on an element
dclick|element to double-click|double-click on an element
Expand All @@ -188,7 +188,7 @@ tagui|relative or absolute filename (see MODULES section)|run another tagui flow
ask|question or instruction for user (reply stored in ask_result)|ask user for input
live|try steps or code interactively for Chrome / visual automation|enter live mode ([Firefox not yet](https://github.com/laurentj/slimerjs/issues/639))

**Tip** - to use variables where text is expected, '+variable+' can be used. XPath is an expressive way to identify web elements. If you know xpath and use xpath for element identifier, use double quotes for text //\*[@title="Login"]
**Tip** - to use variables where text is expected, \`variable\` can be used. XPath is an expressive way to identify web elements. If you know xpath and use xpath for element identifier, use double quotes for text //\*[@title="Login"]

<details>
<summary>
Expand Down
6 changes: 3 additions & 3 deletions src/samples/3_github
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ wait 10 seconds

// use api step to call api, response will be saved in api_result variable
// variables can be used (eg from fetch or read step, files or self-declared)
// use '+variable_name+' to incorporate variables into your api step
// '+variable_name' can also be used in other steps in place of text
// use `variable_name` to incorporate variables into your api step
// `variable_name` can also be used in other steps in place of text
country = "SG"
api http://services.groupkt.com/country/get/iso2code/'+country+'
api http://services.groupkt.com/country/get/iso2code/`country`
echo api_result
echo 'Country name - ' + api_json.RestResponse.result.name
2 changes: 1 addition & 1 deletion src/samples/6_datatables/6C_datatables
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo github_id " - " user_email
this.echo('api your_website_url/mailer.php?APIKEY=unique_key&SUBJECT=Hi @'+github_id+'&SENDTO='+user_email+'&SENDFROM=Your Name <[email protected]>&MESSAGE=Your message line 1.<br><br>Your message line 2.');

// how api step is used to send email with 1 line, in this case using Tmail (another open-source project from TA)
// api your_website_url/mailer.php?APIKEY=unique_key&SUBJECT=Hi @'+github_id+'&SENDTO='+user_email+'&SENDFROM=Your Name <[email protected]>&MESSAGE=Your message line 1.<br><br>Your message line 2.
// api your_website_url/mailer.php?APIKEY=unique_key&SUBJECT=Hi @`github_id`&SENDTO=`user_email`&SENDFROM=Your Name <[email protected]>&MESSAGE=Your message line 1.<br><br>Your message line 2.

// response and result from the api call will be printed to screen and log, below is sample response from Tmail
// OK - Hi @ironman mail sent successfully to [email protected]
Expand Down
2 changes: 1 addition & 1 deletion src/samples/8_hastebin
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ combined_data = combined_data.replace(/[\x0E-\x1F]/g,'');
combined_data = combined_data.replace(/[\x80-\xFE]/g,'');

// type data + save data + retrieve raw text url
type //textarea as '+combined_data+'
type //textarea as `combined_data`
click save function button-picture enabled
click raw function button-picture enabled
echo 'UPLOADED URL - ' this.getCurrentUrl() + '\n'
6 changes: 3 additions & 3 deletions src/samples/9_misc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dom document.querySelector('#header p').blur(); return document.querySelector('#
echo 'dom_result from multiple statements - ' dom_result

// passing 1 or more variables to dom step can be done using dom_json variable
// this is used instead of '+variable+' due to dom communication constraints
// this is used instead of `variable` due to dom communication constraints
// example of passing 1 variable to dom step for use in dom
dom_json = '#header p'
dom return document.querySelector(dom_json).innerText
Expand Down Expand Up @@ -91,8 +91,8 @@ echo 'test_string - ' test_string
// for loop can be expressed in natural language or JavaScript
for column from 1 to 6
{
// '+variable_name+' can be used where text is expected
show (//table)[3]//td['+column+']
// `variable_name` can be used where text is expected
show (//table)[3]//td[`column`]
// JavaScript code can also be used in the loop
test_string = "DEF";
}
Expand Down
8 changes: 4 additions & 4 deletions src/samples/a_facedetect
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ number_of_frgnd_images = count(image_criteria_1)
for n from 1 to number_of_frgnd_images
{
current_image = '('+image_criteria_1+')['+n+']'
snap '+current_image+' to '+profile_name+'/'+n+'.png
snap `current_image` to `profile_name`/`n`.png
}

// extract base on background image presentation
Expand All @@ -27,7 +27,7 @@ number_of_bkgnd_images = count(image_criteria_2)
for n from 1 to number_of_bkgnd_images
{
current_image = '('+image_criteria_2+')['+n+']'
snap '+current_image+' to '+profile_name+'/'+(n+number_of_frgnd_images)+'.png
snap `current_image` to `profile_name`/`(n+number_of_frgnd_images)`.png
}

// use face detection deep-learning model from
Expand All @@ -44,9 +44,9 @@ for n from 1 to total_number_of_images
// 2 different flavours to run face detection inferencing
// flavour 1 - command line version to send image filenames
// face_recognition library offers command line execution
// run face_detection '+flow_path+'/'+profile_name+'/'+n+'.png
// run face_detection `flow_path`/`profile_name`/`n`.png

// flavour 2 - python version to run inferencing in python
// flavour 2 - python version to run inferencing in python
// send image filename variable from tagui to python process
// before running python code to detect faces and return result
run_result = ""
Expand Down
2 changes: 1 addition & 1 deletion 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.0.5: use following syntax and below options to run ./tagui flow_filename option(s)"
echo "tagui v4.1.0: use following syntax and below options to run ./tagui flow_filename option(s)"
echo
echo "headless - run on invisible Chrome web browser instead of default PhantomJS (first install Chrome)"
echo "chrome - run on visible Chrome web browser instead of invisible PhantomJS (first install Chrome)"
Expand Down
2 changes: 1 addition & 1 deletion 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.0.5: use following syntax and below options to run - tagui flow_filename option^(s^)
echo tagui v4.1.0: use following syntax and below options to run - tagui flow_filename option^(s^)
echo.
echo headless - run on invisible Chrome web browser instead of default PhantomJS ^(first install Chrome^)
echo chrome - run on visible Chrome web browser instead of invisible PhantomJS ^(first install Chrome^)
Expand Down

0 comments on commit 26616d4

Please sign in to comment.