UI Action Methods
These methods are only applicable for UI Based Test Class. i.e. web, mobile & desktop based pass testing
Last updated
These methods are only applicable for UI Based Test Class. i.e. web, mobile & desktop based pass testing
Last updated
In testing context, assertions make sure the product has met the expectations. QATTS gives you various useful and simple methods to run assertions.
State Check
Assert HTML Elements
Assert Product Elements
Assert Groups
stateCheck is a feature to know whether the execution control landed on the intended page. This method requires three parameters.
void stateCheck(String htmlElementName, String attType,String targetValue)
assertElement method compares the actual value of a html element name with the expected target value. Here the attType param gives additional information about the html element on with the assertion has to be made.
boolean assertElement(String htmlElementName, String attType, String targetValue)
assertField methods compares the actual value of the Product element with the expected value. There are two method variants in this category. The first method with additional param Object objectValue can used when you know exact expected value or the expected value is expected to be from previous test result.
The latter method will perform assertion from the test data found in the excel sheet.
boolean assertField( String prodElementName, String elementType, Object objectValue)
boolean assertField( String prodElementName, String elementType)
Group assertion is similar to the above element assertion. The only difference is you will be doing assertion on a group. All the Product element under the given group will be asserted in a single go. By setting recursive, Qatts will find all the product elements under the group by continuously looping through subgroups.
boolean assertGroup(String groupName,String elementType)
boolean assertGroup(String groupName, String elementType, boolean recursive)
Automation process requires loading of test data from the data repository. QATTS has couple of data loading methods that assist in test automation process. These methods work on Product Elements.
populateField method is used to populate the UI element with the test data.
void populateField( String elementName)
void populateField( String elementName, Object objectValue)
void populateGroup( String groupName)
void populateGroup( String groupName,boolean recursive)
void populateAlert(String productElement)
List extractLinks(String url, String productElement)
List extractLinks(String productElement)
Map checkBrokenLink(String url)
void performNamedAction( String actionName)
void performFieldLevelAction(String sectionName)
void performElementChecks( String sectionName)
void performPageChecks(String productElement)
boolean waitForInvisibilityOfElement(String htmlElementName)
List> getTableData(String UIElement)
void refreshPage(String url)
void alertAction(String htmlElement, String data)
int getElementSize(String htmlElementName)
boolean contains(String htmlElementName, String attType,String targetValue)
boolean containsElement(String htmlElementName)
boolean containsText(String findText)
Map extractGroup( String groupName,String elementType)
Map extractGroup( String groupName,String elementType,boolean recursive)
QArray extractTableData(String htmlElementName)
String getErrorMsg(String elementName)
String getText(String htmlElementName)
String getAttribute(String htmlElementName,String attName)
List getAttributesAsList(String htmlElementName)
void clearField(String elementName)
boolean mouseOver( String elementName)
boolean mouseOverAndClick( String elementName)
boolean mouseOverIf( String elementName)
boolean mouseOverAndClickIf( String elementName)
void switchWindow(Integer windowNo)
void switchWindow(String windowName)
void switchToFrame(String nameOrId)
void switchToDefaultFrame()
void closeWindow(Object window)
boolean clickIf( String elementName)
boolean click( String elementName)
void takeScreenShot(String labelName)
void checkW3(String url)
void checkW3()
void checkAccessibility()
void checkAccessibility(String url)
void checkAccessibility(String url,String uAgent)
void checkAccessibility(String url, boolean uAgent)
Object getUserInput(String ...attName)
Name
Type
Description
htmlElementName
String
Dom element name
attType
String
Type of the attribute
targetValue
String
The actual value of the html element
Name
Type
Description
htmlElementName
String
HTML element name
attType
String
Type of the attribute
targetValue
String
The actual value of the html element
Name
Type
Description
prodElementName
String
Dom element name
elementType
String
Type of the UI element. [input, view, error]
objectValue
Object
The actual value
Name
Type
Description
groupName
String
Name of the group
elementType
String
Type of the UI element. [input, view, error]
recursive
boolean
TRUE or FALSE
Name
Type
Description
elementName
String
Name of the group
objectValue
Object
The value to be search