Working in the
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

Working in the Expert View (Preview) PowerPoint PPT Presentation


  • 32 Views
  • Uploaded on
  • Presentation posted in: General

Working in the Expert View (Preview). USINGQTP65-STUDENT-01A. Lesson Objectives. In this lesson, you will: Translate the Tree View into the script form of the test Identify QuickTest functions from VBScript operations and functions

Download Presentation

Working in the Expert View (Preview)

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Working in the expert view preview

Working in the

Expert View (Preview)

USINGQTP65-STUDENT-01A


Lesson objectives

Lesson Objectives

In this lesson, you will:

  • Translate the Tree View into the script form of the test

  • Identify QuickTest functions from VBScript operations and functions

  • Observe the flexibility of test scripts modified using the Expert View


When to use the expert view and vbscript

Test Requirements

1. Check that the selected airline is the airline listed in the Depart table.

2. Display the result in the test results.

example

When to Use the Expert View and VBScript

Use the Expert View when test requirements cannot be satisfied from the Tree View.


What s underneath the tree view

Browser object

Page object

"userName" Set "jojo"

WebEdit Object

Method

"Value"

What’s Underneath the Tree View?

The edit fieldis contained in the pagethat is inside the browser.


Test steps in the expert view

Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(“userName").Set "jojo"

Test Steps in the Expert View

Browser object .

Page object .

WebEdit object .

Method

"Value"

The edit fieldis contained in the page that is inside the browser.

  • Each line of code is fully qualified

  • The Expert View allows more flexibility than the Tree View as it shows all the arguments per object on each line of code


The expert view is editable

Declare variables

Add programming logic

Add QuickTest functions

The Expert View is Editable

Add non-recordable statements to the test:

  • Retrieve information from an object

  • Perform operations on an object


The expert view object model

Unique characteristic to identify an object

An action performed on an object

The Expert View Object Model

QuickTest

Property

Method /

Function

Object.

An object can set a property or perform a function.

Dialog("Login").WinEdit("Agent Name:").Set "jojo"Dialog("Login").WinEdit("Password:").SetSecure "3e149bbfd87db5058f903d"Dialog("Login").WinButton("OK").ClickWindow("Flight Reservation").Close


The data table in the expert view

The Data Table in the Expert View

  • Data Table

  • Sheet

  • Parameter/Column

Data table

Parameter

Sheet


Important utility functions

Object

Description

Function

Reporter

The object used to send information to the Test Results

ReportEvent

Instructs QuickTest to pause between these two steps (in seconds)

Wait

example

Reporter.ReportEvent micGeneral, "Calculated Date","The date calculated was: "&NewDate

Important Utility Functions

  • Enable you to control test run and send messages to the test results file

  • Not associated with any object


Using programming functions and logic

Using Programming Functions and Logic

Add VBScript to the test to perform the following actions:

  • Variable declarations

  • Date functions

  • Decision-making and loop conditions

  • Calculations


Quicktest for scripting process

Analyze the test requirements.

What do I need to test?

What are the objects I need to investigate?

What QuickTest methods or properties can I use to handle the objects (import data, iterate the test, report the results)?

What programming conventions will best meet the requirement (loop, a conditional statement, a counter)?

What variables do I need to define?

Write the code to meet test requirements.

Adhere to VBScript syntax and programming conventions.

Use comments to add documentation in the script.

Use the online QuickTest and VBScript references to help you with functions and syntax.

QuickTest for Scripting Process


  • Login