AutonomIQ Inc May 2, 2019
This Document contains commands and examples that are currently supported by AutonomiQ
Majority of the command are not-case sensitive but saving are reading variables are case sensitive.
1. Open/Launch/Go to/navigate website [url]
"open website https://www.google.com"
"go to website https://www.google.com"
2. Switch to first/second/1/1st/2/2nd/3/3rd/original/new tab/window
"switch to new tab"
this will move focus on other pop-up windows If new window comes-up
"switch to original window"
this will get the focus back to the original window if a new window comes down
"switch to 3rd tab"
this will move focus to another pop-up window If multiple window comes-up
3. Switch to alert/prompt/confirm and click on ok/accept/leave/cancel/stay
"switch to alert and click on ok"
4. Set screen/window size - [width * height]
"set screen size - 500 * 500"
"set screen size 500*500"
"set window size - 500 * 500"
"set window size 500 * 500"
Click/Press on/at [element text]
"click on user name" | "click at user name"
"press on password" | "press at password"
Click/Press on/at [radio/checkbox] next to [element text]
"click on the radio next to username"
"press at the radio next to password"
Select/choose [element text]
"select username" / "choose password" + data tab should deliver the data which should be selected
"select Passed in Status"
Passed is the value in the dropdown with Status as the title of the dropdown
1. Enter/Type in/fill in/set text in [field]
"enter hanSong in username"
"type in hanSong in username"
"fill in hanSong in username"
Hover over/on [field]
"hover over username" / "hover on username"
Using Assert will ensure that the testcase fails and halts at the failed step
Using Verify will ensure that the testcase fails but the execution will not halt. It will proceed to the next step.
1. Verify {xpath: "xpath"} is [xpath]
"verify {xpath: "//img[@class='gb_Wa']"} is {xpath: "//img[@class='gb_Wa']"}"
- verfy command only support elements founded by xpath now.
2. Verify {xpath: "xpath"} [contains/begins with/ends with] [text]
"verify {xpath: "//img[@class='gb_Wa']"} begins with google"
3. Verify {xpath: "xpath"} [contains/begins with/ends with] [text] [or] [contains/begins with/ends with]
"verify {xpath: "//img[@class='gb_Wa']"} begins with goo or ends with gle"
4. Verify {xpath: "xpath"} is [disabled/enabled/visible/not visible]
"verify {xpath: "//img[@class='gb_Wa']"} is disabled"
5. Verify {xpath: "xpath"} width/height/font-family/text-align/font-size/display/color/background-color is "some value"
"verify {xpath: : "//img[@class='gb_Wa']"} color is #e01719
6. Verify the current URL is [url]
"verify the current URL is https://www.test.com/"
7. Verify new window/tab/alert/pop up/pop-up exists
"verify new window exists" / "verify new alert exists"
this command can be used when want to check whether new windows comes up after
doing action on some element, so that we can consider using 'switch to' command.
8. Verify new window/tab/alert/pop up/pop-up exists
"verify new window exists" / "verify new alert exists"
this command can be used when want to check whether new windows comes up after
doing action on some element, so that we can consider using 'switch to' command.
9. Verify variable ${variable_name} is "some_text"
"verify variable ${var_1} is "test"
- this command is for verifying variable value.
10. Verify image of "something" is on the page.
"verify image of 'person', 'man' is on the page"
11. Verify "some text" is on the screen.
"verify 'login' is on the screen"
12. Verify name/placeholder/data-toggle/value/class/type/any-attr of {xpath: "xpath"} is "some value"
"verify name of {xpath: "//img[@class='gb_Wa']"} is test"
- =this command is for verifying attribute of element.
Instructions are executed if a specific condition is true
"if {condition}, {some instruction to execute if condition is true}"
eg. if current url is "https://...", enter userrname.
Condition is similar to as 'verify'. Use if instead of verify if other instrucitons are to be performed after it
if current url is "some_url",
if {xpath:'xpath_'} is visible, Click on Submit
Defining a Block
"begin block
{instruction1}{instruction2}....end block"
eg:
begin block sample_block open website
enter username
enter password
click on login
end block
Loops (Running block)
"run ${block_name} for (number) times"
eg. run ${sample_block} for 2 times
"run ${block_name} for (number/all) rows"
eg. run ${sample_block} for all rows
eg. User name password user1 pass1 user2 pass2
eg. run ${sample_block} until pop-up exists
- condition is same as verify
Wait for {number} seconds/secs
"wait for 3 seconds"
"wait for 5 secs"
Wait until element is visible/exists
"wait until username is visible"
"wait until username is exists"
Use custom code from
"use custom code from" + data tab should contain the name of the file!!
Upload file to [field]
" upload file to 'select xls,xlsx or csv file' "
"Create random variable
"Create random variable my_project_name"
- how to use that variable in the following Instruction? "Enter project name" + data tab should have "${my_project_name}" value
"Enter username and save it as my_name"
- In this case, Instruction automatically get the value from the data tab and store it into
- my_name variable and they do act as is (this case, Enter username)
${variable_name} to reference a previously saved variable
"Enter ${my_name}"
- saved_variable could be using on Instruction as well!! And they referred to a string
- so in this case, they try to find element having given my_name string.
{today,
"Enter Date" + data tab could have {today, dd/mm/yy} "Enter Date" + data tab could have {today, mm/dd/yy} "Enter Date" + data tab could have {today, yy/mm/dd}
Relative Date support in Data Sources/Files
used format is not case-sensitive
For running a job which should use today's date: {Today, MM/dd/yyyy}
2 days ago from now: {Today - 2{dd}, MM/dd/yyyy}
2 days later from now: {Today + 2{dd}, MM/dd/yyyy}
1 month ago from now: {Today - 1{mm}, MM/dd/yyyy}
1 month later from now: {Today + 1{mm}, MM/dd/yyyy}
1 year ago from now: {Today - 1{yy}, MM/dd/yyyy}
1 year later from now: {Today + 1{yy}, MM/dd/yyyy}
Random number support
In the data tab, "#{AnomTest\d\d\d\d\d\d\d}" is transformed into below AnomTest1657483
(not precisely correct, 'cause It's randomly generated every time)
Saving a variable from label on page or xpath
"save {xpath:"xpath_value"} as
" "save [element text] as "
Next to/before/after
"click on edit next (to) Donald" "click on radio before
" "enter user name after "
Exec _js/py/sh/java{} with ${input_variable_names} returning ${output_variable_name}
"exec _py{print('printing variable: ' +aiq_1)} with ${var_1} returning ${var_2}"
"exec _js{return 'printing variable: ' + aiq_1} with ${var_1} returning ${var_2}"
"exec _sh(echo 'printing variable: ' + aiq_1) with ${var_1} returning ${var_2}"
( if var = "testing", var_2 = "printing variable: testing" )
_(xl|var){"excel formula"} as
same format with excel formula
eg. _xl{TEXT(TODAY(), "mm-dd-yy")} as date ( date: 02-13-2019 )
eg. _xl{SUM("$15", "$16")} as sum ( sum : 31 )
This will work for HTML tables with table-tr-td tags. This command identifies the cell below First Column for which Second Columns value matches.
Click on "FirstColumnName" Where SecondColumnName [operator] SecondColumnValue
Examples with different operators given below
"Click on "Move" Where Winning % is 55.71"
"Click on "Black" Where Black Elo is not undefined"
"Click on "White" Where White Elo greater than 2700"
"Click on "Move" Where Winning % lesser than 55"
"Click on "White" Where White Elo begins with I"
"Click on "Wins" Where Move starts with g"
"Click on "Black" Where Date ends with ?"
"Click on "White" Where Date contains 1994"
"Click on "White" Where White Elo != undefined"
"Click on "Move" where Winning % > 55"
"Click on "Move" Where Winning % < 55"
"Click on "Move" Where Winning % <= 55"
"Click on "Move" Where Wins >= 70060"
"Click on "Move" Where Wins = 70060"
Enter text
"Enter text in "Review" Where Location is Mysore"
- Review is the column name here.
Radio Button Selection
"Click on radio in "No" Where Location is Mysore"
- No is the column name here.
Checkbox Selection
"Click on checkbox in "Choose" Where Name is Anki"
- Choose is the column name here.
DropDown Selection
"Choose "Books" Where Name is SKM"
- Books is the column name here, the value to choose is given in testdata
"Choose "The Shinning" Where Name is Anki"
- The Shinning is the value in the dropdown. The column in which this comes up need not be specified.
Click/ Enter text based on row number
Other similar commands are listed below
"Click on "Move" Where row is 3"
"Click on "Move" Where row is last"
Get the table row count returned to test step as a variable
"Get table row count as variable_Name"
- This will return the count of the number of rows in the table.