MonkeyTalk all Actions or methods  with their Description and Examples



MonkeyTalk all Actions or methods  with their Description and Examples
 
Monkey Talk Action Description Example for Android
Device Rotate This function is use to Change the device orientation.
Android : Portrait, Landscape
Ios:Right, Left
Device * Rotate Landscape
Back IOS : Pops the present UINavigation Item (if there is any one)
Android: Presses the hardware device key
Device * back
forward IOS : Pushes the next UINavigation Item, if there is any one
Android: ignored.
N/A on Android.
search IOS : ignored.
Android : Press search key of the device.
Device * Search
Screen-shot This function is used to develop screen-shot folder in executing project and you can capture screen-shot at any screen Device * Screen-shot
Menu Android : Press the device menu key.
iOS: ignored
Device * Menu
Shake This function is used for specific app. Device * Shake
Get This function return “iOS” or “Android”. Device * Get a
Table Select This function is used to choose elements from the table. Table * Select Boron
SelectRow Choose a row.
row – the row to choose
section – the section including the row. (Ignored on Android).
Where section and row are argument.

ScrollToRow (by row) Scroll down to a row by row number.
Row :- the row to choose
section :– the section including the row. (Ignored on Android).
Where row and section are argument and both args must be integer.

ScrollToRow (by Value) Scroll down to a row by value.
value (int) -: the value of the row to scroll to.

Set Editing Activate or DE-activate table editing. IOS -: Activated editing mode for table. Android: ignored. N/A for Android.
Insert Insert a row into the table. iOS: Inserts a row.
Android -: Ignored.
N/A for Android.
Remove Remove a row from the table.  iOS: Deletes the row. Android: Ignored. N/A for Android.
Move Move a row. IOS :- Move a row.
Android: Ignored
N/A for Android.
Select Index Choose an item by index. Table * Select-index 3
Where 3 is item no i.e index and index no should be integer.
LongSelect Index Long press an item by index. Table * LongSelectIndex 4
Where 4 is item no i.e index and index must be integer.
View verify Verify that a property of the component has some expected value. If  Expected value is null then it  verify the existence of the components. Syntax: Component Type MonkeyId  Check arg
where for argument pass expected value for verification and component type can be any component of monkey talk like label,button,tab bar etc.
Example: Label #1 Check “Welcome, test1” %thinktime = 9000
Label LOGOUT Verify LOGOUT %thinktime = 4000
or
View  LOGOUT Check LOGOUT %thinktime = 4000
Verify Not Verify that a property of the component doesn't have some value. If  Expected value is null then it  verify the non-existence of the component. Component Type MonkeyId  Verify Not arg
Label LOGOUT VerifyNot Login %thinktime = 4000
or
View LOGOUT Verify Not Login %thinktime = 4000
Verify Regex Verify that a property of the component match some regular expression.
VerifyNot Regex Verify that a property of the component doesn't have a value matching a regular expression
Verify Wildcard  Verify that a property of the component have a value matching some wild-card expression
VerifyNot Wildcard  Verify that a property of the component doesn't have a value matching some wild-card expression
Get Retrieves a value of property from the component Syntax: Component Type MonkeyId Get Variable Prop Path
Ex : Button LOGIN Get b : text
Label #1 Get a
Tap Taps on the component. On Android, plays a “click”. On iOS, plays a TouchDown / TouchMove / TouchUp sequence. Button LOGOUT Tap
Swipe Swipe(scroll)  the component in direction Right, Left, Down, or Up (case insensitive) WebView web view swipe Down
Table * Swipe Up
Slider * Swipe Right
Drag Drag across and Touch down the component, then up Input user-name Drag 43 154 181 162
where 43 and 154 are x1,y1 i.e starting coordinates and 181 & 162 are x2,y2  i.e ending coordinates.
Touch Down Start touching the component. Input user-name Touch Down 43 154
where 43 and 154 are x and y coordinates of touch and x,y should be integer.
Touch Move Drag across the component.
one or more (x,y) coordinate pair specifying the path of the drag gesture
Input user-name Touch-move 146 170
Touch Up Stop touching / feeling the component Input user-name Touch Up 43 154
where 43 and 154 are x and y coordinate of touch where touch is released and x,y must be integer.
Pinch Pinch the components.
scales – The scale factor relative to the point of the two touches in screens coordinate
velocity – The velocity of the pinch in scale factor per second (read - only)

Exec Call a Function on a component. The Function Should take zero or more String argument and should return a String result. Not implemented yet according to basic logic of gorilla.
Long Press Perform a long press on the component. On Android, plays a “long Click”. On iOS, play a long Push gesture View LOGOUT Long Press
Button LOGIN Long Press
Button Selector Select Choose an item by value. Button Selector forms_radios choose A
Select Index Choose an item by index.
LongSelect Index Long press an item by index.
Input Enter Text Input the text into the input field.text :– the text to input
hit Done – iOS : if true, hit Done key after inputting the text. Android : ignored.
Where text and hit done are argument of enter text action.
Input user-name Enter Text test
Clear Clear text from the value inserted field Input user-name Clear
Script Execution Execute the script with the given args. Script test2.mts Run john “my password” %thinktime = 4000
Run With Execute the script with the given CSV file. Script data driven.mts credentials.csv
Slider Select Choose a numeric component value Slider forms_slider_bar Select 52 %thinktime = 4000
Tab Bar Select Choose an item by value. TabBar * Select hierarchy %thinktime = 2000
Select Index Chooses an item by index. Tab Bar * Select Index 2 %thinktime = 6000
LongSelect Index Long press an item by index.
Vars Define Define the named variable used in the script. Vars * Define user pass
Check Box On This action sets or return the Active state of a check box. Check Box forms_checkbox on
Off This action sets or return the Unchecked state of a check box. Check Box forms_checkbox off
Item Selector Select Select an item by value. Item Selector * Select Carbon
Select Index Selects an item by index. Item Selector * Select Index 8
LongSelect Index Long press an item by index. Item Selector * LongSelect Index 8
Button Tap Taps (click) on the Button. On Android, play a “click”. On iOS, play a TouchDown / TouchMove / TouchUp sequence. Button LOGOUT Tap
Date Picker End Date Change the current value of date.
A date with the format
→ YYYY-MM-DD where YYYY is the year,
→ MM is the month (01-12), and DD is the day (01-31).

Numeric Selector select Choose a numeric value of component
RatingBar select Choose a numeric value of component
Scroller scroll Scroll to the specify coordinate.
X - and the X - coordinate (horizontal)
y – the y-coordinate (vertical)

Text Area Enter Text Input text into the insert field.
text – the text to enter
hit Done – iOS: if true, hit Done key after entering text. Android: ignored.
Where text and hit done are argument of enter text action.
Text Area * enter Text “This is a text area”
Clear Clear text from the field of input Text Area * Clear
Tool Bar Select Index Chooses an item by index.
LongSelect Index Long press an item by index.
Video Player Play Play the video from the current play back point.
Pause Halt the video at the current playback point
Stop Stop the video and set playback from the start point.
Menu Select Choose an item by value. Menu * choose About
Verify
Menu * Verify About
Select Index Chooses an item by index.
LongSelect Index Long press an item by index.
Doc vars List the named variable used in the script.
script Document the script itself.
Label All functions of view are applicable on the labels.
Label #1 Verify “Welcome, test1”
Label LOGOUT Verify Not LOGIN
Setup Run Executes the setup script with the given args. Set Up login.mts run Jonny “mine pass-word”
Run With Data - drive the setup script with the given CSV data file. Set Up login.mts run with cre.csv
(where the first arg is the data file file name )
Tear down Run Execute the tear down script with the given args Tear Down logout.mts to execute
Run With Data - drive the tear down script with the given CSV data file. Tear Down logout.mts run with logout.csv
Test Run Execute the test script with the given args. Test testcase1.mts execute
Run With Data-drive the test script with the given CSV data file. Test testcase1.mt run with login.csv
Toggle On Enabled the switch on. Toggle the MonkeyId On
Off Disabled the switch. Toggle the MonkeyId Off





Near Field Communication Support NFC Smart Poster Support













Security Testing Test Cases
Monkey Talk Component Types List


Mobile Testing with QTP How to install .ipa files for ipad iphone



Touch Screen Simulating User Gestures

MOBILE APPS    QTP TESTING QUESTIONS  MANUAL TESTING  ANDROID APPS


No comments:

Post a Comment

Popular Posts