Seapine Labs
Personal tools

Retrieve data from an application

From Seapine Labs

Jump to: navigation, search

One of the tasks that you may frequently perform is retrieving live data from an application or Web page, for use later in the script.

In QA Wizard, this was accomplished using a checkpoint in conjunction with the RUNTIME function. QA Wizard Pro has taken a different approach to this step. (Don't worry, QA Wizard Pro still has checkpoints. They are now used to check data and not to retrieve data.)

QA Wizard Pro includes a built-in function, called getControlData, that returns the value of a property. Following is the syntax:


This function includes three arguments:

  • WindowName - String; name of the Window object (name of the window in the application repository)
  • ControlName - String; name of the control that you want to get data for (name of the control in the application repository)
  • PropertyDisplayName - String; name of the property you want to retrieve the data for

To find the available properties for an object, select it in the application repository, right-click, and choose Properties from the context menu.

This function returns the data for the specified property, which can then be assigned to a local variable in the script or used as the parameter for another function.

[edit] Example

[edit] Scenario

You have a Web page with a hyperlink that you want to find the text for and store in a local variable named LinkText. The hyperlink is named "hyperlink1" in the application repository and is a child of the "Wysicorp - Home Page" Window. After you find the text, you want to click the link and make sure the title of the page that gets loaded is the title ("Wysicorp - " + LinkText).

[edit] Code

LinkText = getControlData("Wysicorp - Home Page", "hyperlink1", "Inner Text")
Window("Wysicorp - Home Page").HTMLLink("hyperlink1").Click()
WindowCheckPoint("Wysicorp_follow_link", "Text", "Wysicorp - " + LinkText)

Issue Management Software | Source Code Control Software | Test Case Management | Requirements Management Software