All Projects → intuit → automation-for-humans

intuit / automation-for-humans

Licence: MIT license
Converts English statements to automation.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to automation-for-humans

InstaBot
Simple and friendly Bot for Instagram, using Selenium and Scrapy with Python.
Stars: ✭ 32 (-52.24%)
Mutual labels:  selenium, english
Link Grammar
The CMU Link Grammar natural language parser
Stars: ✭ 286 (+326.87%)
Mutual labels:  natural-language, english
Parse English
English (natural language) parser
Stars: ✭ 137 (+104.48%)
Mutual labels:  natural-language, english
ig-automatic-story-viewer
Python Program To Send Instagram Story Views
Stars: ✭ 17 (-74.63%)
Mutual labels:  selenium
Whatsapp-Bot
Web.whatsapp.com bot made with selenium
Stars: ✭ 39 (-41.79%)
Mutual labels:  selenium
zhihu-crawler
徒手实现定时爬取知乎,从中发掘有价值的信息,并可视化爬取的数据作网页展示。
Stars: ✭ 56 (-16.42%)
Mutual labels:  selenium
dnevnik mos ru
Python module to get easy machine access to dnevnik.mos.ru
Stars: ✭ 21 (-68.66%)
Mutual labels:  selenium
python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (-35.82%)
Mutual labels:  selenium
Easytax
A simple automation script that logs into your kra account and files your taxes with one command
Stars: ✭ 13 (-80.6%)
Mutual labels:  selenium
SmartReview
💠 单词智能复习项目 - 艾宾浩斯遗忘曲线 + 混淆词
Stars: ✭ 43 (-35.82%)
Mutual labels:  english
FCH-TTS
A fast Text-to-Speech (TTS) model. Work well for English, Mandarin/Chinese, Japanese, Korean, Russian and Tibetan (so far). 快速语音合成模型,适用于英语、普通话/中文、日语、韩语、俄语和藏语(当前已测试)。
Stars: ✭ 154 (+129.85%)
Mutual labels:  english
whatsapp-web
Simon is a Python library that helps made easy the browser automation for WhatsApp Web service
Stars: ✭ 67 (+0%)
Mutual labels:  selenium
convert-british-to-american-spellings
Convert text so that British spellings are swapped with their Americanized form or vice versa.
Stars: ✭ 26 (-61.19%)
Mutual labels:  english
linkedinBot
Automate the process of sending referral request and cold mailing on LinkedIn
Stars: ✭ 25 (-62.69%)
Mutual labels:  selenium
giulius-selenium-tests
A test harness that allows Selenium tests to be run using JUnit and test fixtures to be created and injected by a WebDriver-aware Guice
Stars: ✭ 12 (-82.09%)
Mutual labels:  selenium
InstaPy
📷 Instagram Bot - Tool for automated Instagram interactions
Stars: ✭ 14,719 (+21868.66%)
Mutual labels:  selenium
nalcos
Search Git commits in natural language
Stars: ✭ 50 (-25.37%)
Mutual labels:  natural-language
SeleniumTDD
A Selenium TDD framework that incorporates key features of Selenium and TestNG which can be used to create web-based automation scripts.
Stars: ✭ 23 (-65.67%)
Mutual labels:  selenium
tithiwa
Automate Web WhatsApp with selenium in python.
Stars: ✭ 17 (-74.63%)
Mutual labels:  selenium
instagram-profilecrawl
📝 quickly crawl the information (e.g. followers, tags etc...) of an instagram profile.
Stars: ✭ 964 (+1338.81%)
Mutual labels:  selenium

automation-for-humans

circle-ci Build Status Build status Codacy Badge All Contributors

Converts English statements to Selenium Automation.

Architecture

Demo

How to use

git submodule update --init
make -C dsl/ alpine
  • Write English statements for some flow.
  • Define a suite say public-sites. Write the test cases to execute inside.
{
    "name": "public-sites",
    "platform": "web",
    "executables": [
        {
            "name": "github",
            "type": "file",
            "location": "sample-inputs/public-sites/github-nav-demo.txt"
        }
    ]
}
{
    "execution-mode": "parallel",
    "runnables": [
        "suites/public-sites.json"
    ]
}
  • Run the code from the root directory :
python3 src/automate.py
  • After the code is executed, one can see the screenshots and the gif in the recordings/ folder created.

English Keywords

Keyword Use Example
open Used to open a url/application open "https://github.com/"
click Used to click on an element click on "Issues"
type Used to type a string in some element type "afh-random-user" in "Pick a username"
wait Waits for a particular amount of time in seconds wait for "10"
hover Used to hover over an element hover on "Fragments"
assert Used for asserting elements are present on the screen assert "Milestones"
execjs Used to execute javascript inside the browser context execjs "localStorage.setItem('random-key', 'false');"

That's all! We currently support only a minimum set of keywords and intend to keep to it that way. There is some advanced-searching that you can do with the same keywords, explained in advanced-keywords-use.

Core Philosophy

The core philosophy of automation-for-humans is that the automation tests should mimic the user's behavior. Then we ask ourselves the question, what all things can a user do while they are interacting with the UI that we have built. The most common actions that a user does is click, type, hover. More complex actions include drag-and-drop, click-and-drag etc. Supporting the complex actions would involve and non-trivial pixel math which automation-for-humans does not plan to support in the initial phase.

Another aspect core to automation-for-humans is that it does not store XPath's and use it as an identifier while running the tests. Instead automation-for-humans stores only the text, which is how the user sees and interacts with the page.

Integrating with any environment

Integrating with automation-for-humans is extremely simple and involves just one step, installing the dependencies.

OS support :

CI-Platforms :

.circleci/config.yml .travis.yml
(For Mac)
.appveyor.yml
(For Windows)

Advanced Keywords Use

Sometimes one has no choice but to use the id's, class, automation-id attributes to identify elements on the web-page. For such edge-cases, and to provide completeness to the testing framework, automation-for-humans exposes an additional feature with most keywords.

Keyword Use Example
click Used to click on an element with id "issues-id" click on "issues-id" "id"
click if present Used to click on an element if its present click if present on "issues-id"
type Used to type a string in some element with class name `"#user-name"` type "afh-random-user" in "#user-name" "class"
assert Used for asserting an element with href as `"/intuit/automation-for-humans"` assert "/intuit/automation-for-humans" "href"

One can search for an element with any attribute using the above syntax.

Resolving ambiguity

If multiple elements exist on the page that look alike(text-wise) then there is ambiguity by specifying the order in which they appear. Defaults to the 1st element that appears if nothing is specified.

Keyword Use Example
click Used to click on the 2nd issue click on 2nd "issue"
type Used to type a string in the 4th text box named "enter text here" type "afh-random-user" in 4th "enter text here"

Experimental Features

Mac OS X UI Automation

automation-for-humans also works with automating Mac OS X apps. It uses Appium For Mac as the underlying driver.

Currently it supports interaction by specifying the AXPath's. This is completely against the core-philosophy that automation should be done in a way the user would interact with the UI rather than hidden details and xpath's. Support for using it without specifying AXPath's is being worked on.

New Keywords added :

Keyword Use Example
wait until Used to wait until the element is visible wait until "/AXApplication[@AXTitle='Calculator']"

Record and Replay functionality for Mac OS X apps

automation-for-humans provides a record and replay functionality for users to records the actions and replay them. In fact the sample-inputs/mac-osx-apps/calculator.txt has been generated using the same functionality.

To records, first start Appium For Mac. Then in the terminal execute :

python3 src/action-recorder-mac.py <app-name> <output-file-path>

Press Ctrl + C to terminate the script from recording.

This will produce a file with all the commands that you have executed in a way that automation-for-humans understands. For readability, the script also adds in a comment before each line (starting with #) which attempts to be the English version of the same command.

Atom Syntax Highlights Package

automation-for-humans supports syntax highlighting for the Atom editor, which can be found at atom-syntax-highlight. Clone the folder into Atom's packages folder (~/.atom/packages for MacOS), and reload Atom to use it.

Contributors

Thanks goes to these wonderful people (emoji key):

Rohith R
Rohith R

💻
Alan Yee
Alan Yee

💻
Vishwa
Vishwa

💻
jdfalko
jdfalko

📖
Rocio Montes
Rocio Montes

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].