Learn Scripting by Example
-
Overview
-
List of Examples by Command Category
-
List of Examples by UI Element
-
'Array Creation and Manipulation' Command Category Examples Listing
-
'Conditional (Branching) Control' Command Category Examples Listing
-
'Looping & Jumping Flow Control' Command Category Examples Listing
-
'Math & String manipulation' Command Category Examples Listing
-
'Creation and Assignment of 'Labels'' Command Category Examples Listing
-
'Email' Command Category Examples Listing
-
'Exception Handling' Command Category Examples Listing
-
'Keyboard Actions' Command Category Examples Listing
-
'Logging and Reporting on 'Application Performance'' Command Category Examples Listing
-
'JSON Creation and Manipulation' Command Category Examples Listing
-
'Interacting w/ Web Services using wsCONNECT' Command Category Examples Listing
-
'Interacting w/ Databases using dbCONNECT' Command Category Examples Listing
-
'Excel' Command Category Examples Listing
-
"Accessing Contents of Files and persisting files in 'Files' Module" Command Category Examples Listing
-
Attaching a Data File to an Email
-
Attaching a File to an Email
-
Composing and sending an email
-
How do I enter text in an input field
-
Examples for wsCONNECT Commands
-
How do I append text in an input field
-
How do I clear text in an input field
-
How do I simulate "Enter" action along with data entry
-
How do I simulate "Tab" action along with data entry
-
How do I validate the value in an input field
-
How do I validate if a particular option of the drop-down is selected
-
How do I read the value of an input field
-
To enter the value based on the condition
-
How do I select an option in the drop-down
-
How do I read if a radio button is selected or not
-
How do I validate the selected options of a multi-select drop-down
-
How do I validate if a particular option of the drop-down is NOT selected
-
How do I read the option(s) selected in the drop-down
-
How do I select a Radio button
-
How do I validate if a particular radio button is selected
-
How do I select/check a checkbox
-
How do I unselect/uncheck a checkbox
-
How do I validate that a particular checkbox is selected/checked
-
How do I validate that a particular checkbox is not selected/checked
-
'XML Creation And Manipulation' Command Category Examples Listing
-
How do I attach a screenshot captured within the test into the Email
-
How do I insert a screenshot captured within the test into the Email Body
-
How do I insert a screenshot captured within the test for the last executed test instruction into the Email Body
-
How do I insert a screenshot captured within the test for the last failed test instruction into the Email Body
-
How do I insert a screenshot captured within the test for the last failed test instruction containing a specific command into the Email Body
-
How do I insert a screenshot captured within the test for the first failed test instruction containing a specific command into the Email Body
-
How do I append the contents of a Dataset into the Email Body
-
How do I append the contents of a Data File into the Email Body
-
Creating the Email Body from HTML
-
Customizing the Look & Feel (Style) of the Tables within the Email Body
-
Merge the values from dataset into the variables within the Email body
-
How do I print a string or value
-
How do I read the visibility of an element
-
How do I validate the element is visible
-
How do I click on a link
-
How do I get the required element into viewport
-
How do I click at specific coordinates
-
How do I validate the text on UI
-
How do I get number of records from a data file
-
How do I read data from a data file
-
How do I perform an arithmetical sum operation
-
How do I perform an arithmetical product operation
-
How do I transfer the execution control from one block of code to another block by a label when the specific condition is met
-
How do I open a new window
-
How do I validate if a particular radio button is not selected
-
How do I validate the color of the element
-
How do I store the text of an element
-
How do I perform specific steps on any command failure in the test run
-
How do I get the details (instruction Id & instruction) of the failed command(s) in the test run
-
How to get command details (Target, Value) of the failed command(s) in the test run
-
How to script conditions using if-else-endIf construct
-
How do I immediately end the test
-
How do I shift the focus from a particular element
-
How do I Press 'Enter' in the Keyboard
-
How do I clear the contents
-
How do I close an overlay on the screen
-
How do I press 'Up' arrow in the keyboard
-
How do I press 'Down' arrow in the keyboard
-
How do I press 'Left' arrow in the keyboard
-
How do I press 'Right' arrow in the keyboard
-
How do I perform 'Shift'+'Tab' action in the keyboard
-
How do I fetch the length of the string
-
How to script multiple conditions using if-elseIf-else-endIf construct
-
How to iterate through a block of code until a condition is met
-
How to set text when the element is in read-only state
-
Downloading file from the AUT in a device (iOS/Android)
-
How do I retrieve the values from an Excel File
-
Providing device permissions while downloading a file from the AUT (iOS/Android)
-
To automate iFrames in iOS Devices
-
How do I simulate "Enter" action along with data entry
-
How to work with elements inside a frame
-
How to switch the focus of the elements between frames
-
How to select the popup window on the UI
-
How to handle application prompts
-
How to handle application alerts
-
How to handle application confirmations
-
How do I get number of fields/columns read from a data file
-
How do I get a specific cell value from a data file
-
How do I get a specific Row values from the dataset
-
How do I set value to a cell in the dataset
-
How do I assign values to a row in a dataset
-
How do I save data in row/column format to a data file
-
How to summarize the data from a datafile using SQL query and persist the summarized data to a datafile
-
How do I create a JSON object from the contents of a data file
-
How do I create a JSON Object from the contents of a dataset
-
How do I validate whether the input provided is a valid JSON
-
How do I compare two different JSONs
-
How do I insert data into a JSON object
-
How do I merge two or more JSON objects to a single object
-
How do I remove data from a JSON object
-
How do I replace existing keys in the JSON object by path
-
How do I replace existing values in the JSON object by path
-
How do I append the values to an array within the JSON object
-
How do I check for the occurrence of a specific value in a JSON
-
How do I retrieve values from JSON object using "index" or "name" as reference and store it in a variable
-
How do I retrieve an object from JSON using "index" as a reference
-
How do I unquote JSON values and returns the result as a string
-
How do I add CDATA within an XML document at the given path
-
How do I append values to the end of the indicated NodeList within an XML document
-
How do I check whether the given path exists in the given XML
-
How do I validate the syntax of the XML string.
-
How do I add comment to an XML string
-
How do I convert a Data File into a XML Node structure
-
How do I convert a Dataset into a XML Node structure
-
How do I get the maximum depth of the JSON object and length (size) of an array for the defined path in the JSON object
-
How do I get values from a JSON object for the defined path
-
How do I extract the values from the given path in a XML string
-
How do I get the depth and length of a XML string
-
How do I insert data in the XML document at the given path or value
-
How do I retrieve the node list from the given XML document using "index" and "name"
-
How do I remove data in the XML document at the given path or value
-
How do I replace existing keys/values in an XML document
-
How do I check a specific value is present in the input XML document
-
How do I set the "attributename" and "attributevalue" in given nodes of an XML document
-
How do I execute the SQL query in the test run
-
How do I get SQL Error Details (Code, Text) of the executed Query in the test run
-
How do I specify the maximum size of the result set to display after executing the query in the test run
-
How do I set the "timeout" for SQL Queries in the test run
-
How do I validate whether the given path exists within a JSON
-
How do I compare two XML strings
-
How do I access a GET service - REST
-
How do I access a POST service - REST
-
How do I access a PUT service using REST
-
How do I access a DELETE service - REST
-
How do I use different authorization methods with REST Services
-
How do I assign label to a test run automatically
-
How do I transfer the execution control from one block of code to other block by a label
-
How do I access a REST service which has URL/Query parameters
-
How do I set the Header parameters and access a REST service
-
How do I access a web service which is not accessible in the public domain
-
How do I read the Error message from the JSON Response for a REST Service
-
How do I set timeout for a web service request
-
How do I perform an arithmetical average operation
-
How do I generate a random number within provided range of integers
-
How do I replace all the occurrences of a substring with another substring
-
How do I fetch the position of the first occurrence of a specific value in string
-
How do I generate the timestamp in a specific format
-
How do I perform arithmetic operations on numbers with special characters like currency symbol or comma
-
How do I round off the decimal values to two digits
-
How do I split a sentence or words that are separated by a comma
-
How do I extract the part of a string from a large string or a sentence
-
How do I fetch the position of the last occurrence of a specific value in string
-
How do I fetch only few elements in a list of items/array
-
How do I sort the list of items(alphabetic/numeric) in an array either in ascending/descending order
-
How do I append generated Cumulative Load Timings with in TimeforTestInstructions block to a Dataset
-
How do I capture application response time
-
How do I capture and print cumulative load timing for set of instructions in Transaction Detail Report
-
How do I update the values in an Excel File
-
How do I skip the execution of code inside the loop for the current iteration and move the control to the beginning of the loop for next iteration
-
How do I skip specific set of lines of code during execution
-
How do I select multiple options from a drop down
-
How do I access a SOAP service request
-
How to use oAuth commands for different grant types
-
How to read data from an Json file (stored in Files module) from within my test run
-
How to read data from an Xml file (stored in Files module) from within my test run
-
How to store data to a Json file in Files module from within a test run
-
How to store data to a Xml file in Files module from within a test run
-
How do I close a native mobile app?
-
How do I uninstall a native mobile app?
-
How do I perform tap action based on the coordinate values in a Mobile App
-
How do I perform rotate action in a Mobile App
-
How do I double tap in a Mobile App
-
How do I perform double tap action based on the coordinate values in a Mobile App
-
How do I zoom in a mobile app?
-
How do I store app package information?
-
How do I store app activity information?
-
How do I get the size of an element for a native mobile app?
-
How do I open a closed mobile application?
-
How do I tap on elements in mobile apps
-
How do I swipe based on the coordinates in mobile apps
-
How do I store the location of an element in mobile apps
-
How do I assert content description for the element in mobile apps?
-
How do I store content description for the element in mobile apps?