-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
This page present you all command with the associated pattern working with each one.
-
alertsee -
clicksee -
closesee -
conditionsee -
configurationsee -
cookiesee -
createsee -
deselectsee -
exitsee -
fillsee -
formsee -
framesee -
getsee -
gosee -
impltm(IMPLicit Time Out) see -
isClickablesee -
isNotSelectedsee -
isSelectedsee -
keyboardsee -
logsee -
loopsee -
mousesee -
numberOfWindowssee -
pagesee -
presenceOfAllsee -
presenceOfsee -
printsee -
reloadsee -
resizesee -
screenshotsee -
scriptsee -
selectsee -
submitsee -
textContainssee -
textIssee -
textMatchessee -
titleContainssee -
titleIssee -
titleMatchessee -
urlContainssee -
urlIssee -
urlMatchessee -
usesee -
visibilityOfAnysee -
visibilityOfsee -
wajax(Wait AJAX) see
This part details all pattern to use with example. You can understand how patterns work here
Action on javascript alert
['alert' => [
'type'=>':string :in("accept", "dismiss", "isPresent", "sendKeys")',
'value?'=>':string'
]]Example :
- alert :
type: accept- alert:
type: sendKeys
value: example commandClick on the specified element
['click' => [
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string']
]Example :
- click :
id: myElementClose the current window
['close' => 'window']Example :
- close : windowMake a derivation on scenario based on a condition. This condition can be answered by a Logic class.
['condition'=> [
':string :in("eval","logic")'=>':string',
'correct'=>['steps'=>':array'],
'incorrect'=>['steps'=>':array']
]
]Example :
- condition :
eval: 'true == false'
correct:
steps:
- go: http://youtube.fr
incorrect:
steps:
- go: http://wikipedia.frChange configuration at runtime
['configuration'=>[
'wait?'=> [
'for' => ':string :regexp("/(\d)*/")',
'every'=> ':string :regexp("/(\d)*/")'
]
]
]Example :
- configuration:
wait:
for: 30
every: 250Create a cookie
['cookie' => [
'name'=>':string',
'value'=>':string'
]
]Example :
- cookie:
name: MyCookieName
value: MyCookieValueCreate a new tab or window and switchTo it
['create' => ':string :in("tab","window")']Example :
- create: windowDeselect the element in a
['deselect'=>
[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'type'=>':string :in("checkbox", "radio", "select")',
'by'=>':string :in("value","index","text","pltext")',
'value'=>':string or (:number :int)'
]
]Example :
- deselect:
id: mySelect
type: select
by: value
value: 'Yes'Exit the scenario and throw an error with the specified message
['exit'=>':string']Example :
- exit: Scenario exitFill the element with text
['fill' => [
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'with' => ':string',
'before?' => ':string :in("clear")'
]
]Example :
- fill:
name: element
with: AutoMate- fill:
name: element
with: AutoMate
before: clearCan submit a specific form
['form'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'type'=>':string :in("submit")'
]]Example :
- form:
id: myForm
type: submitSwitch to a frame or iFrame
['frame'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext") ?'=>':string',
'index?'=>':number',
'default?'=>'content'
]]Example :
- frame:
id: myIFrameGet a value in an element and store it in Word scope variable with name varname. Call it with {{ world.varname }}
['get' =>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'what'=>':string :in("text","attribute")',
'attribute?'=>':string',
'varname'=>':string'
]
]Example :
- get:
id: element
what: text
varname: textElement- get:
id: element
what: attribute
attribute: data-index
varname: attributeElementGo to the adress
['go'=>':string :url']Example :
- go: http://github.frSet up the driver implicit time out.
Prefer explicit timeout by using
configuration
['impltm'=>':number']Example :
- impltm: 40Wait until the element is clickable
['isClickable'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- isClickable:
id: elementWait until the element is not selected
['isNotSelected'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- isNotSelected:
id: elementWait until the element is selected
['isSelected'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- isSelected:
id: elementCan simulate keyboard actions on active element
['keyboard'=>[
'event'=> ':string :in("releaseKey","pressKey", "sendKeys")',
'keys'=> ':any'
]
]Example :
- keyboard:
event: releaseKey
keys:
- key1: 'A'
- key2: 'M'- keyboard:
event: sendKeys
keys:
- key1: 'myKeys'Add a message to the message queue
['log'=>':string']Example :
- log: the messageRun steps for X times
['loop'=> [
'repeat'=> ':number',
'steps'=> ':array'
]
]Example :
- loop:
repeat: 5
steps:
- cookie:
name: myCookie
value: myValueCan simulate mouse actions
['mouse'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'event'=> ':string :in("click","doubleClick","mouseDown","mouseUp","mouseMove")'
]]Example :
- mouse:
id: element
event: doubleClickWait until the number of windows is
['numberOfWindows' => ':number']Example :
- numberOfWindows: 2Load the page into the PageHandler
['page' => ':string']Example :
- page: example.indexWait until the presence of all element located
['presenceOfAll'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- presenceOfAll:
id: myElementWait until the presence of a specific element
['presenceOf'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- presenceOf:
id: myElementPrint a text on terminal
['print'=> ':strin']Example :
- print: 'my text'Reload the current page
['reload'=>'page']Example :
- reload: pageResize the current window
['resize'=>[
'type'=>':string :in("maximize","fullscreen","size")',
'size?'=> [
'width'=>':number',
'height'=>':number'
]
]
]Example :
- resize:
type: maximize- resize:
type: size
size:
width: 500
height: 400Take a screenshot
['screenshot' =>[
'type'=> ':string :in("all","element")',
'sname'=>':string',
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement") ?'=>':string'
]
]Example :
- screenshot:
type: element
sname: myScreenshot.png
id: myElement- screenshot:
type: all
sname: myScreenshot.pngExecute the given script
['script'=>':string']Example :
- script: 'return 0==1;'Select the element
['select'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'by'=>':string :in("value","index","text","pltext")',
'value'=>':string or (:number :int)'
]
]Example :
- select:
id: mySelect
by: index
value: 0Fill and submit an element
['submit'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'text'=>':string'
]]Example :
- submit:
id: myElement
text: 'Automate'Wait until text contains the text
['textContains'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'value'=>':string'
]
]Example :
- textContains:
value: myText
id: myElementWait until text is the text
['textIs'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'value'=>':string'
]
]Example :
- textIs:
value: myText
id: myElementWait until text matches the text
['textMatches'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string',
'regexp'=>':string'
]
]Example :
- textmatches:
regexp: '/[a-zA-Z]/'
id: elementWait until window title contains
['titleContains' => ':string']Example :
- titleContains: myTitleWait until window title is
['titleIs' => ':string']Example :
- titleIs: myTitleWait until title matches
['titleMatches' => ':string']Example :
- titleMatches: '/[a-zA-Z]/'Wait until url contains
['urlContains' => ':string']Example :
- urlContains: youtubeWait until url is
['urlIs' => ':string']Example :
- urlIs: https://www.youtube.comWait until url matches
['urlMatches' => ':string']Example :
- urlMatches: 'youtube'Permit to import another scenario. You can use sub to import a scenario that is in the current scenario folder. You can use main to use the main specified scenario (main.yaml)
['use'=>':string']Example :
- use: main.scenario- use: sub.mySubScenarioWait until any element is visible
['visibilityOfAny'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- visibilityOfAny:
id: myElementWait until the element is visible
['visibilityOf'=>[
':string :in("css","xpath","id","class","name","tag","linktext", "pltext", "pageElement")'=>':string'
]
]Example :
- visibilityOf:
id: myElementWait until an ajax function to execute
['wajax'=>':string']Example :
- wajax: 'return JQuery.active == 1;'AutoMate Wiki - v0.8.0 - This wiki can change at any moment