项目作者: automation-for-humans

项目描述 :
Contains the lex and yacc DSL specification for automation-for-humans
高级语言: C++
项目地址: git://github.com/automation-for-humans/dsl.git
创建时间: 2018-12-09T16:09:07Z
项目社区:https://github.com/automation-for-humans/dsl

开源协议:

下载




dsl-for-humans



The lex and yacc definitions and the compiler for the DSL in automation-for-humans.


Usage

To compile :

  1. make all

To parse an input file say, sample-inputs/public-sites/github-nav-demo.txt, type :

  1. # No need to give .txt extension
  2. make validate src=sample-inputs/public-sites/github-nav-demo

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 Wait’s for a particular amount of time in seconds
wait for “10”
hover Used to hover over an element
hover on “Fragments”
execjs Used to execute javascript inside the browser context
execjs “localStorage.setItem(‘random-key’, ‘false’);”

Advanced Keywords Use






















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”

Resolving ambiguity

















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”

Mac OS X UI Automation












Keyword Use Example
wait until Used to wait until the element is visible
wait until “/AXApplication[@AXTitle=’Calculator’]”