Giter VIP home page Giter VIP logo

tagui's Introduction

TagUI

NOTICE: The AISG team is discontinuing the maintenance and support of TagUI. As of Q4 2023, we will no longer provide updates or support. Meanwhile, do expect delayed response from our team. It is easy to migrate TagUI .tag workflow files to Python rpa package .py scripts. See this link.

To start, click the download link below. Take the free course. Ask any questions at our Telegram.

Download v6.114 | Usage Guide | Demos | Samples | Slides | Podcast | Video | 中文


Write flows in simple TagUI language and automate away repetitive time-consuming tasks on your computer. Tasks include those on websites (native support for Chrome and Edge), desktop apps, or the command line. The TagUI project is open-source and free forever. It's easy to setup and use, and works on Windows, macOS and Linux.

Besides English, flows can be written in 22 other languages, so you can do RPA using your native language. Check out this demo video automating data collection in 4 different languages. With the new TagUI turbo mode, you can even run your automation 10X faster than normal human speed!

Language designed for RPA

In TagUI language, you use steps like click and type to interact with identifiers, which include web identifiers, image snapshots, screen coordinates, or even text using OCR. Below is an example to login to Xero accounting:

https://login.xero.com/identity/user/login
type email as [email protected]
type password as 12345678
click Log in
// besides web identifiers, images of UI elements can be used
type email_box.png as [email protected]
type password_box.png as 12345678
click login_button.png

Grabbing data from a table on a website can be as easy as below (where n is the nth table on the webpage)

table n to forex_rates.csv

Moving data between TagUI and Excel is as easy as using standard Excel formula that you are familiar with

top_salesman = [Monthly Report.xlsx]August!E11

Sending a Telegram notification is trivially easy (first message @taguibot to authorise it to send messages)

telegram id Hello World. Olá Mundo. नमस्ते दुनिया. 안녕하세요 세계. 世界,你好。

Do RPA Any Way You Want

You can use TagUI MS Office Plug-ins (sample doc) to easily create and deploy Word doc as RPA robots, and set up RPA data parameters using Excel. Enjoy a full-featured RPA IDE with toolbar of TagUI steps and tooltips, snapshot tool to automate using computer vision, task pane for settings and run output.

You can also create and edit your RPA robots using commonly used text editors like Notepad, Notepad++, VS Code, Sublime, TextEdit, Vim, etc. For VS Code users, you can install TagUI language extension. For Notepad++ users, you can download TagUI plug-ins here for syntax highlighting, shortcuts and snippets.

For cloud lovers, you can run TagUI on your web browser or phone using free Google Cloud, up to 5 concurrent sessions. For more control running on the cloud, you can run this Docker image (use edge tag) on your preferred vendor. Or run on free Node-RED instance on OpenFlow.

Word Plug-in v3

Ecosystem and Communities

TagUI has a bustling user community, and extended community champions create new RPA tools for their own communities, based on TagUI. Python users can pip install rpa to use the #1 Python RPA package. Already there is TagUI for C# .NET, and TagUI for Go is being built. For event-driven RPA with thousands of connectors, check out TagUI module for Node-RED, a popular free and open-source workflow automation tool.

For Microsoft Power Automate Desktop users, you'll be happy to know that there's 2-way integration with TagUI out of the box (for business continuity if you switch between the 2 apps). Also, do check out other leading open-source RPA tools, to see if they meet your needs better - OpenRPA & OpenFlow, OpenBots, Robocorp. All of them support enterprise-grade orchestrating and running TagUI robots from their orchestrator.

There is also a Chinese usage guide and TagUI repository. We welcome more languages with open arms.

Enterprise Security by design

Security Considerations

  • TagUI default implementation is an on-user-computer on-prem RPA tool that does not exist on any cloud
  • TagUI is not a SaaS or software on the cloud running on vendor's cloud, it runs on actual users' computers
  • Industry-specific certifications like PCI-DSS, HIPAA, SOX aren't applicable because TagUI doesn't store data
  • In decentralised bottom-up RPA, not advisable and no need for bot credentials as users are held accountable

Data Considerations

  • For data at rest, storage encryption would be on user's computer's OS-level as it is run on user's computer
  • For data in use, recommend user to manually enter sensitive info like password before letting robot take over
  • For data in motion, users' enterprise app websites are now https by default for secure data entry and retrieval

More Information

  • See this guide on enterprise installation, including whitelisting details, TagUI architecture and dependencies
  • With -report option, there is a summary and detailed logs of robots, with support for centralised reporting

How to get started

Join the community and ask any questions at our Telegram chat group. Take TagUI free course over one morning or afternoon, and start using the most popular open-source RPA software. Share this TagUI slide deck with your team or customers to win their buy-in to use TagUI.

If you are maintaining your own fork of TagUI (for eg tech leads, RPA consultants, individual developers), see this maintainer training video series to understand how TagUI works behind the scenes, and for you to modify all aspects of TagUI and extend the software to your customers' exact needs, made-to-measure.

TagUI v5.11

For technical details of TagUI, such as architecture diagram and codebase structure, see the old homepage

Credits

Open-source project Maintainer From How does this contribute to TagUI project
TagUI for China 报表哥 China usage guide and repository in Chinese
TagUI for Notepad++ Md Ardyansyah Indonesia various TagUI plug-ins for Notepad++
TagUI for VS Code Subhas Malik India language extension for Visual Studio Code
TagUI for Robocorp Nived N India run TagUI in Robocorp or Robot Framework
TagUI for Node-RED Allan Zimmermann Denmark low-code event-driven workflow automation
TagUI for C# .NET Allan Zimmermann Denmark C# version of TagUI (Install-Package tagui)
TagUI for Docker Allan Zimmermann Denmark replicable RPA environment for everyone
RPA for Python Ken Soh Singapore Python version of TagUI (pip install rpa)
TagUI v3.0 Ken Soh Singapore personal project before AI Singapore
SikuliX Raimund Hocke Germany computer vision, OCR, input hardware
CasperJS Nicolas Perriault France high-level JavaScript execution engine
PhantomJS Ariya Hidayat Indonesia foundation JavaScript execution engine
SlimerJS Laurent Jouanneau France browser automation for FireFox <= v59

Sponsor

This project is supported by the National Research Foundation, Singapore under its AI Singapore Programme (AISG-RP-2019-050). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore.

tagui's People

Contributors

amirjaballah avatar ariarijp avatar aussiroth avatar davidcb14 avatar derhackler avatar gitter-badger avatar joginderrohilla avatar kensoh avatar lohvht avatar lookang avatar nived00015 avatar ruthtoh avatar ruthtxh avatar ryzalk avatar sachin1004 avatar siowyisheng avatar sivaganesh1988 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tagui's Issues

test report color coding characters

ISSUE - test + report option results in a html file with garbage color coding characters from casperjs testing. FIX - for report option, remove color coding characters if they exist

CLI helper / personal assistant on command prompt

Referencing - https://github.com/tebelorg/TagUI/issues/42#issuecomment-320465044

I would now really want to make a CLI helper which can help to run scripts. The TagUI scripts are already in natural-language-like syntax to convert to JS code. I want to have a helper that can convert natural-language-like instructions on the command line to call the right scripts with right parameters.

Instead of typing tagui abc_bank_balance on command prompt, I think it is more intuitive to support typing erina get my abc bank balance or something like that directly on command prompt. And let the magic happens behind the scenes to return the results.

Having this opens up voice-control possibility later on. And it has synergy with chat user interfaces.

Issue with popups

I'm a newbie so I have a newbie question: how do you handle popups in TagUI?

I'm attempting to create automated tests for an application my company is developing. Some of the functions employ "are you sure" type popups. When this happens TagUI simply sits waiting; it can't "see" the popup and it doesn't throw an error message.
The Chrome extension doesn't record anything when I use it to try to record responding to the popup.
I see that there is a popup command but I can't figure out how to use it. Can someone provide an example?
I'm using Chrome 60 in Windows 7.

PhantomJS Announcement, and TagUI v2.0 ideas

Headless Chrome is coming - https://www.chromestatus.com/features/5678767817097216
(https://news.ycombinator.com/item?id=14101233)

I think people will switch to it, eventually. Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy.

I don't see any future in developing PhantomJS. Developing PhantomJS 2 and 2.5 as a single developer is a bloody hell.
Even with recently released 2.5 Beta version with new and shiny QtWebKit, I can't physically support all 3 platforms at once (I even bought the Mac for that!). We have no support.
From now, I am stepping down as maintainer. If someone wants to continue - feel free to reach me.

Source : https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE

packaged installations for macOS/Linux/Windows

POTENTIAL ISSUE - introducing packaged installations including all dependencies. This is a proactive issue to pre-empt and track potential issues with packaged installations deployment.

macOS and Linux have been rolled out (see Set Up section). There should be no external dependencies or setup required for TA.Gui to work. If you encounter issues using these packaged installations, do feedback here.

Included in the package is PhantomJS, CasperJS and SlimerJS. If you have an existing local installation, the packaged version will be used by TA.Gui. If you go by the manual installation route under Set Up section and install everything separately, TA.Gui will use your manually installed instances.

For Windows, it is in progress of being port-over, before it is released as a packaged installation. The dependencies included will be the same as above, except that additionally, PHP will be included. The total package size should be within GitHub file-size limit, we'll see..

css selectors doesn't work?

hi, I am testing it on the https://google.es page:

http://google.es
show center div

but it returns: ERROR - cannot find center div

is it a bug? or am I doing something wrong?

In general nothing with hierarchy worked for me:

center div
center>div

adding style in the browser (chrome):

center div {
    color: red;
}

correctly detects elements and change their color.

on another page it worked only when selected using class:

<div class="some_class another_class"><label>test</label></div>

.some_class.another_class label WORKED (this came from the chrome extension)
div.some_class label DIDN'T WORK
div label DIDN'T WORK
div>label DIDN'T WORK

cheers, dan

can not record text input action?

I did type text twice,but no footprint remained.

click app .row:nth-child(1) .active
click app .dropdown.done:nth-child(2) .active
click app .row:nth-child(2) .text-input
click app .row:nth-child(3) .select-item.selected
click .day-name.selected .day-item
click .btn.blue-btn
click .time-picker:nth-child(1) .dropdown-toggle
click .time-picker.selected .hour:nth-child(29)
click .time-picker:nth-child(3) .default-time
click .time-picker.selected:nth-child(3) .hour:nth-child(33)
click .save-btn
click .text-area-wrapper.error.resizable textarea
click .button-inner.create-event-btn.disabled

Online storage hastebin.com down? (upload option)

ISSUE - TagUI uses hastebin.com to auto-upload automation run results with upload option, by running another automation flow to upload the original automation flow and result. However, hastebin.com seems to be down past couple of days.

FIX - Have emailed hastebin.com creator and owner to check if there is some temporary downtime, or there is plan to bring down the service. As the service is shared using the open-source Haste project, it might also be possible to host it directly on tebel.org.

Q: How to set a general variable?

Hi Ken,

Another question, is it possible to set a general variable at the beginning of a flow, that can be used everywhere in the flow?

Example:

js var project_name = "MarcoPolo" + Math.floor(Math.random()*200);

// Step 1 create project
enter //input[@placeholder="Project name"] as '+project_name+'
click submit

// Validate
echo project_name
test.assertSelectorHasText(tx('body'), project_name,'Project '+project_name+' created successfully');

Best practices, general improvements and announcement

I wrote a list of the new headless chrome tools. Also updated this list to the awesome test automation list and recommended that list in TagUI readme for developers looking for test automation tools. I believe there is value looking through the various tools, their features, and the issues users raised. Probably will be able to pick up and implement some best practices which are relevant to TagUI's goal.

Now is also a good time to make general improvements to TagUI, checking various areas and functionality for improvements (such as frame, popup, loops, blocks, live-mode, consistency across browsers etc). Jotting down some thoughts below, some points will end up in readme next time.


TagUI is basically a hack that is meant for lazy people who wants to get things done asap without much effort (like me). It takes in super-basic natural-language-like scripts and spits out working nested CasperJS JavaScript code to drive automation. And along with that, broad range of features in TagUI framework which are from my experience important and super-useful to prototype / deploy / maintain web automation.

It probably won't attract contributors partly because it is so specific and already developed in its goal that it will only be relevant for a small number of users (but for those who do, will find it amazingly useful), also partly the coding style is basically to maximize screen real estate when developing using vim while on a nomadic lifestyle. Also, where possible I try not to modularize. Keeping everything in one place is easiest to maintain without having to grab info from multiple sources when it is time to debug.

I also try to reduce dependency as much as possible so that it can be easily deployable by non-developers (unzip and run without the need to install any other tools/environment). Same for Chrome integration, it is done from the ground up directly to talk to Chrome using Chrome Debugging Protocol through a websocket connection, without dependency on other Chrome frameworks/tools. In order to make all these happen, you'll see it implemented in JavaScript, PHP, bash-shell, Windows batch scripting, and Python (for Sikuli visual automation).

The part that I enjoy when making TagUI an open-source project, is it helps me distribute to a larger group of people, who can bounce ideas on how it can be better, or point out something which is in my blindspot. Since 3-4 weeks ago, I have been trying to divert traffic away from this Github page (all the recommendations to other Python tools for datascraping, test automation list for testing etc). I think TagUI has a meaningful user-base now that I'm comfortable supporting. I hope that won't change soon, I would rather spend more quality time working with early users than spreading time thinly to address issues from large number of users.

As some of you already know, almost a month back I said I'm moving away from working full-time on TagUI project. I still have a few ideas to get them implement (and can't wait for that to happen because I want to use those features myself), but it'll be done part-time instead of full-time since I made the first commit in Dec'16. What I found was the initial skeleton took just a few days to write (parsing natural-language to CasperJS JavaScript code). But as features are added on, and each feature gets improved, it takes increasingly larger amounts of time to make marginal improvements.

About a month ago, with TagUI v2.0 release having built-in visible / headless Chrome integration, I think the bulk of the work is done. I would now really want to make a CLI helper which can help to run scripts. The TagUI scripts are already in natural-language-like syntax to convert to JS code. I want to have a helper that can convert to calling the right scripts with right parameters. Instead of typing tagui bank_balance on command prompt, I think it is more intuitive to support typing erina get my bank balance or something like that directly on command prompt. And then the magic happens behind the scenes to return the results. Having this is also a pre-cursor to voice-control possibility later on. Another part I really want to integrate into TagUI is some form of machine learning. Maybe the Yandex's CatBoost project? (low overhead and can be run well on single laptop). Otherwise decision-making is restricted to if statements and so on. Not very sophisticated cognitive ability. Some form of matrix or fuzzy logic ability is simply needed to make TagUI be able to do more in automation.

BUG - Chrome crash

On Chrome, we have run into the following issue regularly.
I have no idea why or what could cause this.

PHP Fatal error:  Uncaught exception 'WebSocket\ConnectionException' with message 'Empty read; connection dead?  Stream state: {"timed_out":true,"blocked":true,"eof":false,"stream_type":"tcp_socket\/ssl","mode":"r+","unread_bytes":0,"seekable":false}' in /Users/tim/Sites/localhost/tagui/src/ws/Base.php:269
Stack trace:
#0 /Users/tim/Sites/localhost/tagui/src/ws/Base.php(143): WebSocket\Base->read(2)
#1 /Users/tim/Sites/localhost/tagui/src/ws/Base.php(135): WebSocket\Base->receive_fragment()
#2 /Users/tim/Sites/localhost/tagui/src/tagui_chrome.php(47): WebSocket\Base->receive()
#3 {main}
  thrown in /Users/tim/Sites/localhost/tagui/src/ws/Base.php on line 269

Conditional logic?

Are there any plans (or have I somehow missed) conditional logic with tagui?

What I mean is, lets say I need to check if something has changed on a website, and if it has changed, do some other actions, for example log in and take a screenshot, but I only want that to happen if an object is found on the loaded page, otherwise it can just discard it and move onto the next website. I'm sure there has to be a way to do this with tagui I'm just overlooking it.

insufficient details of test option

ISSUE - insufficient details of test option. FIX - add section on test under cheat sheet, with details about XUnit XML file (Jenkins-compatible) and CasperJS assertions

Feedback

I used this tool for testing my web.
It was so helpful for me .
Even a normal php developer having no knowledge in automation can use it .

Keep up good work guys .

problems using firefox on linux

I created a new issue from #12 as this is not related to that.

I have problems using ta.gui with firefox on ubuntu 16.04.2 LTS

./tagui my_test.gui firefox
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message

Firefox version: 51.0.1 (64-bit

Q: Run a suite of tests?

HI @kensoh,

Is it possible to run all flows in a directory?
Or run a collection a flows after each other with 1 command?

Example:
./src/tagui ./src/samples/* firefox test

Or is it best to put them in 1 script file where they are listed one by one

Bash script >> with the following

./src/tagui ./src/samples/1_yahoo firefox test
./src/tagui ./src/samples/2_twitter firefox test
./src/tagui ./src/samples/3_github firefox test
./src/tagui ./src/samples/4_conditions firefox test

Parallel execution controller for automation farms

Referencing - https://github.com/tebelorg/TagUI/issues/42#issuecomment-320465044

Parallel runs are good to speed up something, provided that process is not tied with a single user account that is meant for single-login at any one time. TagUI already has web-service for Linux/macOS to allow triggering via URL call. This is a capability which deserves looking further into.

To deploy parallel runs, each machine needs to be a server node and a separate controller script can send the execution requirements to the webservice servers accordingly. Alternatively, each slave can connect to a single master controller machine to retrieve inputs for execution and feedback through the controller webservice. Key functionalities - distribute flows, execute, monitor status, collect results..

Q: Get API_JSON data in variable

I'm trying to open a link that I get from an API reponse, but I'm missing something.

flow api

http://demo3796957.mockable.io/test

//api_config.header[0] = 'Header1: value1';
api http://demo3796957.mockable.io/test
echo api_result
echo 'Link - ' + api_json.link

{
    '+api_json.link+'
}

./src/tagui ./sample/test_api firefox test

Show the following output

ERROR - [LINE 11] cannot understand step '+api_json.link+'
ERROR - automation aborted due to above

some files saved in working directory

ISSUE - some files (downloads, screenshots, text-captures) are saved in TA.Gui working directory. FIX - files should be saved in the same directory as the automation flow

BUG - Different behaviour for assertSelectorHasText

When running assertSelectorHasText on body to verify if a text is present, the script on Firefox PASS but on Chrome it FAILS

Example:

http://tebel.org/gist/about_tebel

test.assertSelectorHasText(tx('body'), "Tebel.Automation",'Check if has keyword');

Firefox: ./src/tagui ./sample/test_body firefox test

PASS Check if has keyword

Chrome: ./src/tagui ./sample/test_body chrome test

AIL Check if has keyword
#    type: assertSelectorHasText
#    file: /Sites/localhost/tagui/sample/test_body.js
#    subject: false
#    selector: "body"
#    text: "Tebel.Automation"
#    actualContent: ""
[info] [phantom] Step anonymous 3/4: done in 1462ms.
# http://tebel.org/gist/about_tebel - About Tebel
[info] [phantom] Step anonymous 4/4: done in 1666ms.
[info] [phantom] Done 4 steps in 1666ms
PASS /Users/tim/Sites/localhost/tagui/hyperlane/test_body (1 test)
FAIL 1 test executed in 1.487s, 0 passed, 1 failed, 0 dubious, 0 skipped.

Q: How to use in CI

Hi Ken,

Love the simplicity of the TagUI and all the features that come with it.

I was hoping to plug it in our CI flow, but it's not clear how to use the report option or is there an option to output the report as "test coverage"?

Perhaps you have some tips or pointers how to use TagUI in a Continuous integration flow?

Q: Redirect issue

Hi @kensoh,

We noticed strange behaviour.
We have scripts that login to gmail and then click a link, use case: account confirmation.

When clicking the link in gmail, gmail redirects should point us to the right website, but now we get to see a "blank" page only.

Any idea what could cause this?

Using debug this is what happens:
[debug] [phantom] Navigation requested: url=https://www.google.com/url?q=https%3A%2F%2Fmandrillapp.com%2Ftrack%2Fclick%2F30863939%2Fapp.testing.loremipsum.co%3Fp%3DeyJzIjoiUDBzakwtZDBuUE82UFdENUxGQ01JQlZFWkNBIiwidiI6MSwicCI6IntcInVcIjozMDg2MzkzOSxcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwvYXBwLnRlc3RpbmcuaHlwZXJsYW5lLmNvXFxcL3JlZ2lzdGVyXFxcL2NvbmZpcm1cXFwvNDlkYWE0OWEtNDA4ZS00MzgzLTlkZjMtNDgxMzc2ZmFmMmQ4LTQ1NGU1OTA0LTFmNzAtNDMxZC04OTkxLTA3ZDcxNjdjYmZkNVwiLFwiaWRcIjpcIjE0NWU0NzU0YjUxNTQxNjA4YjczMjIwYWE4MjRjZTY1XCIsXCJ1cmxfaWRzXCI6W1wiZjEzY2VlNWFmMmRmYWI1YjU2ZjNhNjFkZDI0NGRkOWFkZTAxOWE1ZFwiXX0ifQ&sa=D&sntz=1&usg=AFQjCNFi4IMby8Yb_RyNG2PVmbSSb-eB-A, type=Undefined, willNavigate=true, isMainFrame=true

Why PhantomJS/CasperJS is used?

Why PhantomJS & CasperJS is used?

There is nightmare, a high-level browser automation library.
Under the covers it uses Electron, which is similar to PhantomJS but roughly 2 times faster and more modern.
The is also a Chrome extension Daydream , to record and generates Nightmare scripts for you while you browse.

Bug - frame msg_body

Hi @kensoh

I run into a bug when trying to use the frame method in a test flow

./src/tagui ./sample/2_signup_user firefox test

In this flow we use Mailinator to confirm a mail.
When opening the mail, it opens the mail in a an iframe.

when using frame msg_body in the flow

tagui $ ./src/tagui ./sample/2_signup_user firefox test

It just outputs

Test file: /Users/Sites/localhost/tagui/sample/2_signup_user.js

And then just wait.

If we comment out frame msg_body in the flow, it runs the test without any problems, but it cannot click on anything the iframe

./src/tagui ./sample/2_signup_user firefox test

Test file: /Users/Sites/localhost/tagui/sample/2_signup_user.js           
Mon Jul 31 2017 14:00:35 GMT+0200 (CEST) 
# /Users/Sites/localhost/tagui/sample/2_signup_user 
# https://app.testing.co/login - testing 
# click Create your free account 
...

add chrome extension functions

ISSUE - add more functions besides recording clicks and text entries; FIX - enhance extension to include some other steps such as taking screenshots or saving text information

Headless Chrome integration with TagUI

ISSUE - PhantomJS maintainer is stepping down. Unless a white knight appears to take over development and maintenance, PhantomJS project will over time become obsolete and not an ideal web automation endpoint due to differences in behavior compared to modern web browsers.

FIX - Main maintainer of CasperJS (the tool that TagUI is base on) would like to try to maintain CasperJS with headless Chrome (https://github.com/casperjs/casperjs/issues/1825). That should be able to transition TagUI directly to headless Chrome, besides the current Firefox endpoint through SlimerJS.

In the meantime however, it is worthwhile to dedicate at least a couple of weeks to try to integrate headless Chrome directly with TagUI. For JavaScript projects, this is typically done through chrome-remote-interface. An example is the Chromy project as pointed out by CasperJS user @tobiastom.

Headless Chrome integration is chosen for now instead of Selenium WebdriverIO integration because it is a more direct path (TagUI -> chrome-remote-interface -> headless Chrome, versus TagUI -> WebdriverIO -> Selenium -> headless Chrome and other browsers). Assumption is the shorter path leads to lesser chance of something breaking and result in a better integration for TagUI.

UPDATE - see updates below on the new approach that integrates TagUI directly with Chrome / headless Chrome. A separate PHP thread is used to manage the websocket communications so that there is no new dependency introduced. The original idea to use chrome-remote-interface or Chromy will make the feature unusable by users without Node.js environment.


TagUI v1.8 should be able to be released in a couple of days and work on headless Chrome integration can start. v1.8 is the visual automation release where there is ability to handle interaction by visually looking for webpage objects or desktop objects (through Sikuli integration).

Other new features include improved outgoing API for advance API calls through different methods/headers/body, auto-upload option of run result and automation flow to hastebin.com, and improved step/code block handling using {} which allows powerful and convenient automation when combined with if/for/while/popup/frame. Chrome extension element identification is also improved, and [enter] keyword can be used to type enter keys. More details at readme and release notes.

chrome extension css selectors

ISSUE - sometimes css selectors instead of xpath selectors are returned from extension. FIX - to return all as xpath selectors or cater parser to also handle css selectors

extending intents/steps elegantly...

Hi Guys,
I love the concept behind this and would like to start using tagui, however, it seems difficult to extend the steps....elegantly.

As an example, I would like to create some custom steps....

Step Parameters Purpose
login username language Login to app as a particular user and language e.g. login admin in fr
choose element to select, value select a particular value from a chosenjs selector (https://harvesthq.github.io/chosen/) example: choose category "classical music"

I could fork the project and then adapt for my own usage, but, that means I miss out on all the improvements from other users / contributors etc.

In the same breath, these custom steps would be project specific and we would tend to handcraft the tests rather than use the recorder.

I have an idea that may allow for extending the steps elegantly...

  1. add an /src/steps folder with a steps_custom.inc file storing the step handlers

  2. add `include_once('steps/steps_custom.inc') to the first line of your tagui_parse.php file

  3. here is an example login_intent that would reside in the steps/steps_custom.inc file


    /**
     * @file
     *   Custom steps can be declared in  here
     */
    function login_intent($raw_intent) {
      $params = trim(substr($raw_intent." ",1 + strpos($raw_intent." "," ")));
      $params = explode(' in ', $params);
   
      if (empty($params) || $params.length <> 2) {
        echo "ERROR - " . current_line() . " text missing for " . $raw_intent . "\n";
      }
      else {
        $return[] = 'casper.thenOpen("/?username=' . $params[0] . '")';
        $return[] = 'casper.thenOpen("user/setlanguage?lang=' . $params[0] . '")';
        return implode(PHP_EOL, $return);
      }

    }
  1. change the functions in your tagui_parse.php to do something like this to loop through the intents....and parse correctly.
$script_line = trim($script_line); if ($script_line=="") return "";

	$step_intent = get_intent($script_line) . '_intent';
	if (function_exists($step_intent)) {		
		return $step_intent($script_line);
	}
	else {	
	  echo "ERROR - " . current_line() . " we cannot understand step " . $script_line . "\n";
	}

Q: API - header parameters

Is it possible to set specific header parameters for the API method?
For example for using API keys or token or basic auth.

Or is it beter to use a NodeJS framework in the flow for more advanced API calls?

Test fails with ERROR - cannot find //a[text()="automation"]

Tried with a simple flow, but it fails with ERROR - cannot find //a[text()="automation"]
testflow.zip

https://github.com/tebelorg/TagUI
click //a[text()="automation"]
click //a[text()="casperjs"]
click .form-control.header-search-input.js-site-search-focus
enter .form-control.header-search-input.js-site-search-focus as adrinan7\r
click //a[text()="adrian7/adrian7.github.io"]
click //a[text()="adrian7"]

add sample automation flows

ISSUE - include sample automation flows. FIX - include sample flows in the repo so that users can quickly know how to use TA.Gui from various examples of varying automation difficulty

Chrome extension gets lost on iFrames

When i start recording in Chrome after the login i have to work in an iframe, but TA.Gui only records until i get into the iframe.

Here is the export:

https://www.linz-stromnetz.at/portal/stromnetz/snhome
click username
enter username as USERNAME
click password
enter password as PASSWORD\r
click Login
click fscontentpresentation203820 b .color

But it should go on and on.

Steps { and } should not be used for step / code blocks

ISSUE - In release v1.8, steps { and } are introduced to define steps and code blocks. This adds convenience and powerful automation when used with if/for/while/popup/frame.

The idea is replacing { with

// start of code block
{casper.then(function() {

And replacing } with

})}; // end of code block

The above replacements and some tracking logic will automatically take care of CasperJS code blocks formatting. However, as { and } can also be used in JavaScript to define code blocks, there can be situations where developers want to define custom functions or events which above auto-replacement will break their code. Unless they use js step to explicitly tell TagUI to treat that line as pure JavaScript and not to parse it as a TagUI step.

There should be a better way so that developers do not have to type js { or js } to explicitly treat the line as JavaScript, and normal users can define step/code blocks easily. Maybe checking [ and ] instead as the single character on the line as markers for start and end of step/code block.

Q: How to clear field input

Hi @kensoh

I'm ashamed to ask but how can I clear a (textarea) input?
For example a basic text field input or textarea?

Currently when using textarea:

type //textarea as Lorem ipsum

It adds to the existing text in the textarea.

I dont understand what's happening in the README gif

I am a developer and I dont understand what's happening in the README gif.

Can you please upload another one clearly shows the use case ? Or rather upload one more gif that simply shows the use case of web app automation.

How can install CLI command via npm ?

Hi there.
I want to install TagUI via npm install but I can't execute tagui command.
Because bin is not specified in package.json.

I think there is simple.
Just add "bin":"src/tagui" to package.json.

How do you think ?

Suggestions for main program

Here is a list of issue about TA.Gui :

  • Why does the export file is a text file ?

it could be better to use a structured file for the data as XML or JSON (I prefer JSON because it is a native java-script object container)

1_yahoo

https://www.yahoo.com
// automation flow files start with an URL to tell TA.Gui where to go

// this flow searches github on Yahoo and captures screenshot of results
// for issues or questions, kindly feedback on GitHub or [email protected]
// see cheatsheet for steps, conditions, finding element identifiers, etc
// https://github.com/tebelorg/TA.Gui#cheat-sheet

// use type (or enter) step to enter some text into a webpage element
// use show (or print) step to print text from webpage element to output
// below steps enter text into the search box and print out the value
enter search-box as github
print search-box

// use tap (or click) step to click on a webpage element
// below step clicks the search button
click search-button

// wait a few seconds before capturing whole screenshot
// default wait is 5 seconds and you can also use decimal
// wait 7.5 seconds or 3s or 5sec or 10 secs will work 
wait 6.6

// use snap to save screenshot of webpage or elements
// use snap page to save screen shot of entire page
// use snap element to save screen shot of element
snap page
snap logo

// image snaps are automatically named snapXXXX.png
// unless you provide a filename for the image snap
snap page to results.png
snap logo to logo.png

// to go to another URL from your flow, simply provide the URL
https://duckduckgo.com

// and then continue the automation flow from there
enter search_form_input_homepage as The search engine that doesn\'t track you.

wait 4.4 seconds

vs

{
   steps : [
    {
        comment : "automation flow files start with an URL to tell TA.Gui where to go",
        type: "open",
        url: "https://www.yahoo.com"
    },
    {
        comment : "Fill inputText element",
        type: "enter",
        locator: "search-box",
        text: "github",
    },
    {
        comment : "print data",
        type: "print",
        locator: "search-box"
    },
    {
        comment : "click Event",
        type: "click",
        locator: "search-box"
    },
    {
        comment : "pause",
        type: "wait",
        waitTime: "6.6"
        measure: "second"
    }
  ]
}
  • Why does yours scripts are written in bash and php ?

TA.Gui will never be used under Windows !!! but Windows is the OS used by no-developer.
It could be nice to write all script in javascript because casperJS and phantomJS and SlimerJS understand Javascript.

Tagui must start like that :

#!/bin/env /usr/bin/casperjs 
/*
 *  TA.GUI - Main code
 *  ------------------
 *
 * Documentation: 
 * Repository:    
 *
 * Copyright (c) Ken Soh (2017)
 * Licence: Celill http://www.cecill.info/
 *
 * [e-mail of the author(s)]
 * 
 * This software is a computer program whose purpose is to [describe
 * functionalities and technical features of your software].
 * 
 * This software is governed by the CeCILL license under French law and
 * abiding by the rules of distribution of free software.  You can  use, 
 * modify and/ or redistribute the software under the terms of the CeCILL
 * license as circulated by CEA, CNRS and INRIA at the following URL
 * "http://www.cecill.info". 
 * 
 * As a counterpart to the access to the source code and  rights to copy,
 * modify and redistribute granted by the license, users are provided only
 * with a limited warranty  and the software's author,  the holder of the
 * economic rights,  and the successive licensors  have only  limited
 * liability. 
 * 
 * In this respect, the user's attention is drawn to the risks associated
 * with loading,  using,  modifying and/or developing or reproducing the
 * software by the user in light of its specific status of free software,
 * that may mean  that it is complicated to manipulate,  and  that  also
 * therefore means  that it is reserved for developers  and  experienced
 * professionals having in-depth computer knowledge. Users are therefore
 * encouraged to load and test the software's suitability as regards their
 * requirements in conditions enabling the security of their systems and/or 
 * data to be ensured and,  more generally, to use and operate it in the 
 * same conditions as regards security. 
 * 
 * The fact that you are presently reading this means that you have had
 * knowledge of the CeCILL license and that you accept its terms.
 */

var tagui = { "version": "0.0.1" };

//--------------
// MAIN REQUIRE
// -------------
var _colorizer_ = require('colorizer').create('Colorizer');
var _fs_ = require('fs'), _system_=require('system'), _utils_ = require('utils');

_fs_.read(_fs_.pathJoin(binDir,'usage.txt');

Regards

relative path of flow filename

ISSUE - flow filename is relative to ./tagui location, thus user has to specify full path or path relative to ./tagui. FIX - filename path should be relative to where the command is run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.