QATTS Technical Docs
2.0.0 Main
2.0.0 Main
  • QATTS Product Documentation
  • Getting Started
    • About QATTS
      • A Quick Tour of QATTS
      • Terminology
      • Relationship
    • Dashboard
  • Getting to know
  • Administration
    • Product
      • How to Add Product
      • Configure Test Data Repository
    • Code Branch
      • How to Add Code Branch
    • Feature
    • Client
      • How to Add Client
    • Deployment
      • How to Add Deployment
      • Database Config
      • Email Config
    • Node
      • Streaming Configuration
      • How to register node for streaming
      • Status And Actions
    • Agent
    • User
    • Role
  • Studio
    • UI Elements
      • text_box
        • Properties Library
        • Trouble Shoot
      • loader
        • Trouble Shoot
      • date
      • button
      • drop_down
        • Trouble Shoot
        • Properties Library
      • label
      • check_box
      • radio_button
      • link
      • Shadow
      • Trouble Shoot
      • Properties Library
      • Pre and Post Actions
      • table
        • Example
        • Trouble Shoot
      • form
      • toogle_button
      • file
      • alert
  • Automation
    • Objects
      • UI Element
        • Drop Down
        • Radio Button
        • Multi Elements
        • table
        • form
      • Product Element
        • Advanced Data Types
          • QIntegerArray
          • QStringArray
          • QArray
          • QData
        • Basic Data Types
      • API
      • Query
      • Smarty
        • Excel: Read data from excel
        • File: Reads file Data
        • EmailRead
        • EmailSend
        • SiteScan
        • PDF Utils
      • New Group
    • Test Case
    • Function
    • Data Table
  • Execution
    • Test Case
      • Clients Summary
      • Search and Manage
      • Context Parameters
      • Details by Functionality
        • Sync
    • Test Suite
      • Create Suite
    • Test Run
      • Schedule Test Run
      • Untitled
    • Test Result
      • Results by Clients
      • Results by Fuctionality
    • Build No
    • Reports
      • All Failed Test Cases
      • Recently Failed Test Cases
  • Others
    • Milestone
  • Settings
    • Builds
    • Milestone
  • Site Scan
  • Using QATTS
    • Guide to API Automation
      • Adding API
      • Request
      • Response
        • Writing Response Schema
    • Guide to Web Automation
      • Performing Web Automation
    • Guide to setup agent-service
  • Advanced Data Types
    • QData
  • Methods
  • Standard Actions Methods
    • Execute Methods
  • UI Action Methods
    • extractGroup
  • File Action Methods
  • UI Element Advanced
  • UI Checks
  • Extraction Rules
  • Assertion Operations
  • Error Codes : Automation
  • Error Code: Execution
  • JSpreadSheetUtil Methods
  • Functions
    • Primitive
      • CONCATENATE
    • Date & Time
    • Text
  • Other Information
    • FAQ
    • Troubleshooting
      • UI Methods
Powered by GitBook
On this page
  • Assertion methods
  • State Check
  • Assert HTML Element
  • Assert Product Elements
  • Assert Groups
  • Data population methods
  • Populate Field
  • Populate Group
  • Populate Alert
  • Link methods
  • Extract Links
  • Check Broken Link
  • Other UI action Methods
  • Perform Named Action
  • Perform Scenario Testing
  • Perform UI Checks
  • Perform Page Checks
  • Wait for invisibility of element
  • Get table data
  • Refresh page
  • Alert action
  • Get element size

Was this helpful?

UI Action Methods

These methods are only applicable for UI Based Test Class. i.e. web, mobile & desktop based pass testing

Assertion methods

In testing context, assertions make sure the product has met the expectations. QATTS gives you various useful and simple methods to run assertions.

  1. State Check

  2. Assert HTML Elements

  3. Assert Product Elements

  4. Assert Groups

State Check

stateCheck function is used to know whether the execution control landed on the intended page. This method requires three parameters.

Syntax

void stateCheck(String htmlElementName, String attType,String targetValue)

Name

Type

Description

htmlElementName

String

Dom element name

attType

String

Type of the attribute

targetValue

String

The actual value of the html element

Code snippet

/* 
 *  "I'm Feeling Lucky" button is found on Google's home page, 
 *  which tells you that you are rightly landed on Google's 
 *  home page
 */

stateCheck("bt.iamfeelinglucky", "value", "I'm Feeling Lucky");

Assert HTML Element

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.

Syntax

boolean assertElement(String htmlElementName, String attType, String targetValue)

Name

Type

Description

htmlElementName

String

HTML element name

attType

String

Type of the attribute

targetValue

String

The actual value of the html element

Code snippet

/*
 * Comparing the firstresult of Google search with "https://qatts.com/"
 */

assertElement("li.firstresult", "href","https://qatts.com/");

Assert Product Elements

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.

Syntax

  1. boolean assertField( String prodElementName, String elementType, Object objectValue)

  2. boolean assertField( String prodElementName, String elementType)

Name

Type

Description

prodElementName

String

Dom element name

elementType

String

Type of the UI element. [input, view, error]

objectValue

Object

The actual value

Assert Groups

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.

Syntax

  1. boolean assertGroup(String groupName,String elementType)

  2. boolean assertGroup(String groupName, String elementType, boolean recursive)

Name

Type

Description

groupName

String

Name of the group

elementType

String

Type of the UI element. [input, view, error]

recursive

boolean

TRUE or FALSE

Data population methods

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.

Populate Field

populateField method is used to populate the UI element with the test data.

Syntax

  1. void populateField( String elementName)

  2. void populateField( String elementName, Object objectValue)

Name

Type

Description

elementName

String

Name of the group

objectValue

Object

The value to be search

Code Snippet

/*
 *
 */
populateField("SearchText", "Apple");

Populate Group

void populateGroup( String groupName)

void populateGroup( String groupName,boolean recursive)

Populate Alert

void populateAlert(String productElement)

Link methods

Extract Links

List extractLinks(String url, String productElement)

List extractLinks(String productElement)

Check Broken Link

Map checkBrokenLink(String url)

Other UI action Methods

Perform Named Action

void performNamedAction( String actionName)

Perform Scenario Testing

void performScenarioTesting(String sectionName)

Perform UI Checks

void performUIChecks( String sectionName)

Perform Page Checks

void performPageChecks(String productElement)

Wait for invisibility of element

boolean waitForInvisibilityOfElement(String htmlElementName)

Get table data

List> getTableData(String UIElement)

Refresh page

void refreshPage(String url)

Alert action

void alertAction(String htmlElement, String data)

Get element size

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)

QStringArray getAttributes(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)

PreviousExecute MethodsNextextractGroup

Last updated 2 years ago

Was this helpful?

For more information on UI Checks

UI Methods
click here