RSS Feed

Expert View, Step Generator and Checkpoints Explained with Example

Posted on

It is going to be an article on Expert View overview, Step generator and a brief introduction to Checkpoints that will be carried on further until we cover all the details elaborately with examples on how to use these while recording actual scripts. This is 12th tutorial in QTP training series.

 Expert view of QTP
  • Expert view is where the operations we performed on the AUT get displayed as VB Script code.
  • For every LOC in this view, there is a corresponding column in Keyword view.
  • There is also the action drop down box that can be used to access, view and edit different actions in the test.
  • This view is particularly useful for users who are familiar with programming using VB script.
  • One of the most important uses of this view is that it facilitates the creation of functions and function libraries. (a topic for detailed discussion later)
  • The user can print the test or function library as it appears in this view any time. File->Print will print the test.

This is how it looks:

You can add statements to this view directly by typing in or by using step generator.

Step generator:

  • This is a facility that QTP provides in order to make adding programmatic steps into QTP easy for the user.
  • You can use it in the Keyword view, function library, Active screen or Expert view to generate steps
  • It can be used to write steps into a test or to a function library.
  • To launch, use the menu option “Insert->Step Generator” menu option. Right click any where you want the step to go and select “Insert Step-> Step generator” or F7(except in Active screen)

Step generator

Example:

I will explain this with a scenario: Open http://www.gmail.com and click on “Create Account” link. This is how this statement will look.

1 Browser("Gmail: Email from Google").Page("Gmail: Email from Google").Link("Create an account").Click 

If I need to check if the link exists at all, before I write the code to click on it, I will need a step     before the above statement. This is how I do it:

Step # 1) Select the place where you need the step inserted.

a) Expert view: Place the cursor where you want the step to go and launch step generator.

b) Keyword view:  Select the step below which you want to insert the step.

c) Active screen: In the active screen window, right click and choose the step generator option. It will ask you to choose the object on which your step should be based on. Following that the step generator window is launched.

Step generator

Step #2) This is the step generator window that gets launched. Please note the details that it is displaying now. It is showing all the details related to the step that is currently chosen. We can choose the required values for the new step but that does not affect the current step.

Step generator

I am going to set the values as required by me to enable checking if the link exists.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: