Tuesday, 30 September 2014

Script- To select a mail having subject "Facebook"

Dim n
Browser("title:=Gmail.*").Page("title:=Gmail.*").Link("name:=Inbox.*").Click
n= Browser("title:=Gmail.*").Page("title:=Gmail.*").WebTable("class:=th").RowCount
For i=2 to n
If Browser("title:=Gmail.*").Page("title:=Gmail.*").WebTable("class:=th").GetCellData(i,2)="Facebook" then

Browser("title:=Gmail.*").Page("title:=Gmail.*").WebCheckBox("index:="&i-1).Set "ON"
End If

Next
OUTPUT___________________________________________________________














Functions

Functions

Sub procedure:
Sub: Declares the name, arguments and code that form the body of a Sub procedure.
Syntax:
 Sub name [(arglist)]
   [statements]
   [Exit Sub]
   [statements]
End Sub

Arguments:



Public: Indicates that the Sub procedure is accessible to all other procedures in all scripts.
Default: Used only with the Public keyword in a Class block to indicate that the Sub procedure is the default method
for the class. An error occurs if morethan one Default procedure is specified in a class.
Private: Indicates that the Sub procedure is accessible only to other procedures in
 the script where it is declared.
name:
Name of the Sub; follows standard variable naming conventions.
arglist: List of variables representing arguments that are passed to the Sub procedure when it is called. Commas
separate multiple variables.
statements: Any group of statements to be executed within the body of the Sub procedure.
Example:

Addition 5 , 4
 
Sub Addition( num1,num2)
 
Result=num1+num2
Msgbox  "The Sum of the numbers is    "  &  Result
 
End Sub


Function:

Declares the name, arguments, and code that form the body of a Function procedure.

Syntax:
Function name [(arglist)]
   [statements]
   [name = expression]
   [Exit Function]
   [statements]
   [name = expression]
End Function

Arguments:


Public: Indicates that the Function procedure is accessible to all other procedures in all
 scripts.
Default: Used only with the Public keyword in a Class block to indicate that the Function procedure 
is the default methodfor the class. An error occurs ifmore than one Default procedure is specified
 in a class.
Private:  Indicates that the Function procedure is accessible only to other procedures in the 
script where it is declared or if the  function is a member of aclass, and that the
 Function procedure is accessible only to other procedures in that class.
name: Name of the Function; follows standard variable naming conventions.
arglist: List of variables representing arguments that are passed to the Function procedure 
when it is called. Commas separate multiple variables.
statements: Any group of statements to be executed within the body of the Function procedure.
expression: Return value of the Function.
Example:

Result=Addition(5,4)

Msgbox  "The sum of the number is " & Result 

Function Addition( num1,num2) 
Addition=num1+num2 
End Function  


Call:  
Transfers control to a Sub or Function procedure.

Syntax:
[Call] name [argumentlist]
Arguments:


Call: (Optional) keyword, If specified, you must enclose argumentlist in parentheses.
name: (Required) Name of the procedure to call.
argument list: (Optional) Comma-delimited list of variables, arrays, or expressions to 
pass to the procedure.
Example:

'Call a Sub procedure
Call Addition(5 , 4)
 
Sub Addition( num1,num2)
Result=num1+num2
Msgbox  "the Sum of the numbers is    "  &  Result
 
End Sub


Function Library & Associating Function library to a Test
Different Types of Library files
Different types of library files are ".qfl" files,".Vbs" files

Steps to follow to create Function Library:
1. Functions are created manually:
     File-->New-->Function library(Enter the functions)

2. Save the functions:
      File--> Save (File is saved as .qfl file)

3. Associating Function library to a Test:
     Test --> Settings --> Choose Resources tab --> Choose + button so select the ".qfl" file --> browse and select the ".qfl" file -->
      click OK.


How to use library files in QTP & how we can call these files in to script?

We can load the external Library files by using 2 ways:

1. Choose Test --> Settings --> Choose Resources tab --> Choose + button so select the library file -->  browse and select the
     library file --> click OK.

2.  We can load the library files using Scripting:

Use execute file function to load library files:

Step1. Open a notepad and paste the below function

Example: 

'Code in External Library file(sample.vbs file).
 
function SumOfTwoNumbers(a,b)
Dim sum
sum=a+b
SumOfTwoNumbers=sum
End Function

Step2. Save the notepad as a .vbs file(sample.vbs) in path "D:\Sample.vbs"

Step3. Paste the below code in QTP and execute,You will find that the below code access function from the "sample.vbs" file

Example:

executefile "D:\Sample.vbs"
x=10
y=5
result=SumOfTwoNumbers(x,y)
msgbox result


Example 1
function library------------------------------------------------------------------------------
Public Function Open_browser(ByVal URL)
Set obj=createobject("InternetExplorer.application")
obj.visible=true
obj.navigate(URL)

       ' TODO: add function body here
End Function


Test-------------------------------------------------------------------------------------------
Open_browser("www.gmail.com")



Example-2
function library------------------------------------------------------------------------------ 
Public Function VerifyProperty(ByVal Test_obj, ByVal Actual_value, ByVal Expectedvalue)
    Dim var
    var=Test_obj.GetROProperty(Actual_value)
    If var=Expectedvalue Then
        msgbox "Expected value equals to actual value"
        else
        msgbox "Expected value not equals to actual value"

    End If
End Function
RegisterUserFunc "WinEdit","Verify","VerifyProperty"



Test-------------------------------------------------------------------------------------------
'
'Window("Window").Window("Start Menu").WinButton("All Programs").Click
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Verify "attached text","Agent Name:"
Dialog("Login_2").WinButton("Cancel").Click






 

Monday, 29 September 2014

Script- To focus the cursor on the object

Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Featured Destination:").Click
x=Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Featured Destination:").GetROProperty("abs_x")
y =Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Featured Destination:").GetROProperty("abs_y")

Set objDevice=Createobject("Mercury.Devicereplay")
objDevice.MouseMove x,y
wait (10)


Friday, 26 September 2014

Script- To display dialogbox and close it during runtime


x= "sai"
y= "SAI"
Set objShell=Createobject("Wscript.shell")
If strcomp(x,y,1)=0 Then
    'msgbox "Both are equal"
    objShell.Popup"Both are equal",5,"Qtp DialogBox"
    else
'msgbox "Both are not equal"


    objShell.Popup"Both are not equal",5,"Qtp DialogBox"
End If

OUTPUT----------------------------------------------------------------------------------





Thursday, 25 September 2014

Output Values

Using Output values we can retrive properties of objects ,database field values ,text presenting objects and can store on data table in test result window.

Types of Output Values:

1. Standard output value
2. Text output value
3. Text area output value
4. Database output value
5. XML output value



1. Standard Output value:

 We can use standard output values to output the properties values of most objects.

Steps to follow for Inserting Standard Output Value:

QTP should be in Recording mode --> Insert menu -->Output value--> standard output value --> show the object --> click OK --> select property --> If required Change the column name  --> click OK -->click OK -->stop recording.


2. Text Output value:

We can use text output values to output text strings displayed on a Web page or application. When creating a text output value, We can output a part of the object's text. We can also specify the text before and after the output text.

Steps to follow for Inserting Text Output Value:

QTP should be in recording mode--> Insert menu--> Output value --> Text output value --> show the text -->select one of the option{output text/text before/text after} --> click modify if you want to change the column name --> click OK

click OK--> check in runtime table after executing.


3. Text Area Output value:

We can use text area output values to output text strings displayed within a defined area of a screen in a Windows application.

Steps to follow for Inserting Text Area Output Value:

QTP should be in recording mode --> insert menu -->output value --> text area output value -->Mark the text area -->If required click modify the column name --> click OK --> again click OK --> check in run time table after executing.


4. Database Output value:

We can use database output values to output the value of the contents of database cells, based on the results of a query (result set) that we define on a database.

Steps to follow for Inserting Database Output Value:

Insert menu--> output value --> Database Output value--> choose specify SQL statements manually -->click next -->click create -->Select Machine Data source --> Select Driver (QT_flight32) --> click OK --> enter SQL statement {select * from orders} --> click Finish --> select data cells --> click OK --> Execute and see the results in run time table.


5. XML Output value:

 We can use XML output values to output the values of XML elements and attributes in XML documents.

Steps to follow for Inserting XML Output Value:

QTP should be in recording mode with web environment --> Insert menu --> output value --> XML output value from application --> Show the XML document --> select elements --> click OK -->Stop recording.


Example---------------------------------------------------


Dialog("Login").WinEdit("Agent Name:").Set DataTable("username")
Dialog("Login").WinEdit("Password:").Set DataTable("password")
Dialog("Login").WinButton("OK").Click
Dialog("Login").Dialog("Flight Reservations").Static("Incorrect password. Please").Output CheckPoint("Incorrect password. Please try again")
Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
Dialog("Login").WinButton("Cancel").Click


Output-------------------------------------------------------

Wednesday, 24 September 2014

Action Parameters in QTP

Step-1: Create a test with the structure: Action1 on the top-level, Action2 embedded in Action1.

1) Open a new test.
2) Go to Insert -> Call to New Action.
3) Select the "After the current step" radio button.
4) Click . The new action should be inserted into Action1.

Example:
Action1
Action2

Step-2:
Define an input test parameter:

1) Go to Test -> Settings.
2) Select the Parameters tab.
3) Click the add button (+) for the Input parameters.
4) Enter the following values:
5) Name: TestParam
6) Type: String
7) Value: Hello
8) Click and .

Step-3:
Define an input parameter for Action1:


1) Right-clicking on Action1 and select Action Properties.
2) Select the Parameters tab.
3) Click the add button (+) for the Input parameters.
4) Enter the following values:
5) Name: Action1Param
6) Type: String
7) Click .

Step-4:
Parameterize the input action parameter in Action1: So that it pulls the value from the parameter defined in the test settings.

1) Right-click on Action1 and select Action Call Properties.
2) Select the Parameter Values tab.
3) Click on the cell under the Value column for Action1Param. You will see a button on the right of the cell, click it.
4) Select the "Parameter" radio button. "Test Parameter" should be selected by default.
5) In the Name drop-down list, select "TestParam", which matches the input parameter created in the test settings.

Step-5:
Repeat steps 3 and 4 for Action2:
1) Except name the input parameter Action2Param, and when parameterizing the input value, select Action1Param from the Name drop-down list.

Step-6:
In Action2 insert the following line using Expert View:
msgbox Parameter("Action2Param") The above steps can be repeated if you wish to pass more Parameters.



Example- Action1------------
result1=parameter("Actionparam1")
result2=parameter("Actionparam2")

parameter("ActionOutParam") = result1+result2


Action2---------------------
Runaction "Action1", OneIteration ,2,7, variable1
msgbox variable1
 


Output-7

Tuesday, 23 September 2014

Parameterization in QTP

What is QTP parameterization?
Sometime application does not accept the duplicate data records. In this case if you run same test script with fixed set of input data, application may throw an error due to data duplication. To avoid this issue, QTP provide ways to accept different test inputs to the test script. This process of providing different input values through external parameters is called as parameterization

Types of parameterization in QTP
The variable value can be or the parameter types can be:

  1. Data Table parameters
  2. Test/Action parameters
  3. Environment variable parameters
  4. Random number parameters

Parameterization in QTP using Datatable with Example

Parameterization in QTP using Excel
I checked the parameter value ON and then the there is a location in Datatable field following the name.

Name: The corresponding column name in the data table from where the data needs to be taken. By default QTP will suggest a name. You have an option to keep it as suggested or change it as needed.
Global Sheet:  This sheet of data is available to all the actions in a test.
Current action sheet or local sheet:  as the name suggests, it is the sheet of data that is available to a certain action.
I am going to multiple rows of data to the Global data sheet. This is where the password encoder tool comes in handy. You can put in encrypted values in your data sheet that you get from this tool.







Browser("Gmail: Email from Google").page("Gmail: Email from Google").Sync
Browser("Gmail: Email from Google").page("Gmail: Email from Google").WebEdit("Email").Set DataTable("SignInName", dtGlobalSheet)
Browser("Gmail: Email from Google").page("Gmail: Email from Google").WebEdit("Passwd").SetSecure DataTable("GPassword", dtGlobalSheet)
Browser("Gmail: Email from Google").page("Gmail: Email from Google").WebButton("Sign in").Click
Browser("Gmail: Email from Google").Page("Gmail - Inbox").Link("Sign out").Click

You will see in the above code that the values for the email ID and password are taken from datatable.
This code will run for all the 4 rows of data in the global sheet if in the following screen I set the option “Run on all rows” ON:

QTP Parameterization using Environment Variables

 

Environment variable is a value that remains the same throughout a test run unless explicitly changed by the program.
3 types of environment variables:
  1. User defined internal
  2. User defined external
  3. Built in
We will start with built in variables because that is the simplest.
Built in variables are created by QTP itself and contain information about the test path, operation system etc. These are read only and hence can only be used by the user as they are.

Example- msgbox Environment ("OSVersion")

User defined – external:  In case when we need to have an entire list of environment variables available for a test, the user has an option to create it externally and associate it to the test and make those variable available to this test.
Typically, this file is an .xml with the structure as follow and is available on your desktop:

<Environment>
<Variable>
<Name>First Name</Name>
<Value>Swati</Value>
</Variable><Variable>
<Name>LastName</Name>
<Value>Seela</Value>
</Variable>
</Environment>
Once this is set, we can add this file to the test by going to File->Settings->Environmentand selecting “User defined” from the drop down:

In the screen, you can see the option to add the file, so ahead and add it.
Alternately, if I need the variables in this test for another one, I can export them into a file by clicking on “Export” option.
So now that we know how to set and use environment variables, there is yet another use for these:
In case, we set the values for URL_env and Browser_env variables, then the record and run settings set overrun and no matter what you set there, it is going to consider the values that these variables contain.


 




Saturday, 20 September 2014

XML checkpoints in QTP

XML Checkpoints from application
Open QTP, Press F3(Recording), Select Insert-> Checkpoint->XML Checkpoint from application
After clicking the link qtp navigates to spy the objects in XML and adds each property.
 XML Checkpoints (From Resource)
To add an XML File checkpoints, Do follow the below steps
  • Open QTP from Start Menu
  • Start Recording by pressing F3(Optional)
  • Choose Insert->Checkpoint->XML Checkpoint (From Recourse)
  • XML Source Selection –Checkpoint Properties opens up
In That Two options are available,
Create checkpoint from XML File
Load an XML file from the System, which is already stored

Enter the Internet Address (or path) along with the XML file name in the edit field; the browse button and navigate the XML file and select it.
Click ok Button, XML Checkpoint Properties dialog opens
The selected XML file will be displayed showing it’s element hierarchy and with no properties selected.






Select elements and value that want to be verified and click OK button to add the XML Checkpoints to the test, now the script will be generated in the Expert view.






Ex. XMLFile(“a(infoyep.com).xml”).Check CheckPoint(“a(infoyep.com).xml”)
Save the file and run the script and view the result in the Result Window.

Create checkpoint for test object
By default it shows as “Start Menu”, add a XML or choose from the step which we need to add

Sample XML File
<?xml version=’1.0′ encoding=’us-ascii’?> ‘Define a XML Version’
<number>
<id no =”1”>
<author>Infoyep.com</author>
<title> Enter Title Here></title>
<description> infoyep.com sample XML</ description>
</id>
</number>
In the above code, first line is Defining a XML version, Number tag is the head of the id tag block , author, title and description’s are sub tags  defined with start and end tags.





Friday, 19 September 2014

Bitmap checkpoint

A lot can be inferred from the name of this checkpoint itself.  However, it is often confused with the Image checkpoint.
Differences between Image and Bitmap checkpoints:
Difference #1: Image checkpoint works only on Web environment whereas Bitmap checkpoint works on any supported environments.
Difference #2: Bitmap checkpoint can be used to compare an area of an application or page, an object or any part of an object. On setting this checkpoint it captures the chosen portion of the screen as a bitmap and compares it with the result at run time. In contrast, image checkpoint is just for webimage objects.
Therefore, Bitmap checkpoint captures the visible parts of your AUT and compares them as bitmaps, pixel by pixel.
Typically this is used to check maps, logos or any other diagrams in your AUT.
Couple of important points to remember:
  1. Bit map checkpoints are dependent on factors like screen resolution, Operating systems and RGB settings.  So any changes to any of these factors will cause the checkpoint to fail.
  2. When creating the checkpoint, QTP does not record any part that is scrolled off the screen or hidden by any other object.
  3. While capturing the bitmap if another app is overlapping you AUT then that part of the screen is also captured.
  4. It can be added while recording or from the active screen.
Example: I want to create a bit map checkpoint on the www.gmail.com page’s Google icon.
I start a test with record and run settings set in a way that it opens www.gmail.com on internet explorer when I record the test. Then I select Insert->Checkpoint->Bit map checkpoint. Then I select the ‘google’ logo on the www.gmail page. The following dialog opens up:

a) The image appears in the Bitmap checkpoint properties dialog and then the user has an option to choose either to check for the entire image or choose a selection.
b) If you check on the ‘Check only selected area’ option to be ON, then you will be able to select the portion of the image. Since it is hard to represent it pictorially, I would suggest the readers give it a try practically to see how this works.
c) The other options in the screen are basically the fine tuning properties. They are really there to make sure the checkpoint passes even though certain RGB or pixels are a little inconsistent.
  • RGB tolerance: Once set this value will determine how many RGB values of the pixels can be different for the checkpoint to not fail.
  • Pixel tolerance: when this option is checked on, the user has to select whether he wants to specify this value in % or a number. For example, if the user chooses 5 pixels and the image has 1000 pixels.  If in run time, up to 5 different pixels the differences are not counted towards failing the checkpoint. If more than 5 differences exist, only then the checkpoint fails.  If both RBG tolerance and Pixel tolerance values are set, RGB tolerance is calculated first.
d) There is also a time out factor that we talked about earlier in previous article.
I will go ahead and choose a portion of the logo and click OK.

The following statement is generated in the Expert view:

Browser("Gmail: Email from Google").Page("Gmail: Email from Google").Image("Google").Check CheckPoint("Google")

Keyword view looks like this:
 

  • In case there is a difference in the image in runtime, the checkpoint fails and the two images (one saved, one that came up during runtime) are displayed in the test results.
  • This feature can be configured from: Tools->Options->Run->Screen capture

    Once created the Bitmap checkpoint it can be edited later on from the checkpoint properties screen. This dialog can be launched from the Keyword view, expert view or the Object Repository.

Table checkpoint

  • It can be used in cases when you need to verify that a particular cell in a table has a certain value or in some cases if the table itself has the defined number of rows of columns.
  • When a web table or an equivalent table object is chosen to insert a checkpoint on, Table checkpoint properties get invoked.
  • As a menu option, you choose “Standard Checkpoint” while recording. So the ground rules like creation, editing and maintaining are all the same.
Let us look at an example:
I will pick a random site that has a web table. Open in internet explorer. Start recording, insert checkpoint->Standard checkpoint and choose the table object in the web page:

Select the Web Table element and click OK.

In the properties window, select the cell and specify if a constant value has to be there or parameterize.
In the settings tab, the way in which the verification has to be carried out.




Cell identification, this tab is where the user has the settings to identify a particular row or column.


As I said earlier, since this is a variation of standard checkpoint all the same rules apply.
  • Although, this in-built feature is available for checking tables I don’t find it very useful. There are other functions like GetRowCount, GetColumnCount, GetRowItem etc. to verify the tables. Let me explain that a little bit more before we move on.
  • In practical scenarios checking just one cell might not suffice and creating a single checkpoint for each value in the table might get cumbersome. Eg: If a table is 3X3 then to check each cell, we will see 9 checkpoints. If the value in the second or first cell itself does not match, it does not signal an inconsistent table which kind of defeats the purpose and results in unnecessary continuation of checking the other cells.
  • Instead by reading the table and using GetRowCount, GetColumnCount, GetRowItem functions you can establish a looping mechanism and check as needed and exit on failure. Only consideration for a tester at this point would be to make sure that he writes appropriate test results so that there is clarity.
  • Also, table checkpoint fails in case of dynamic tables.




Thursday, 18 September 2014

Database checkpoint:

 Database checkpoint enables user to check the Content of the back end Database.

Steps to follow for inserting Database checkpoint:

QTP need not be in Recording mode and we do not need AUT since data is from backend.

Insert --> checkpoint --> Database checkpoint -->choose “specify SQL statement manually” option -->click next --> click create --> select machine data source --> Select DSN (QT_flight32) --> click OK --> enter SQL statement (select * from orders) --> finish --> click OK









It will add a line in the expert view as:
DbTable("DbTable").Check CheckPoint("DbTable")
 
 
When you will run the script QTP will check the database whether the record is updated with the customer name or not and will give you the result as pass or fail. DbTable is the database table object, which has following properties and methods associated with it.
  • Exist Property –checks whether the database table exists
  • GetToProperty method – is the same method used for test objects to get the specified identification property.
  • SetToProperty method – is to set the specified identification property.
There could be three identification properties of a database table object – Source, dbuniqueid and connectionstring. So we can parameterize the database checkpoint using these properties and methods, for example if you want to use the same checkpoint to run for more query use the ‘SetToProperty’ method to set the source of the DBTable. Following example illustrates above methods
  1. If DbTable("DbTable").Exist (0) Then
  2. Print " Current query : " & DbTable("DbTable").GetTOProperty ("Source")
  3. DbTable("DbTable").SetTOProperty "Source", "Select * from Orders"
  4. Print " Modified query : " & DbTable("DbTable").GetTOProperty ("Source")
  5. End If

.Result--------------------------------------------------------------------------------------------------------


Standard Checkpoint

Standard Checkpoint:

Standard checkpoint enables users to check object property values.

Three ways to insert standard checkpoints:

a. In expert view,
b. In keyword view,
c. In Active screen.

Steps to follow for Inserting standard checkpoint:

QTP should be in recording mode -->Cursor should be placed in desired location -->Insert Menu -->check point -->Standard checkpoint -->Show the object -->click OK ->select property and enter expected results--> click OK--> Stop Recording.

Steps to follow for Editing standard checkpoint:

Identify Checkpoint statement and right click -->Select checkpoint properties option --> Modify the value -->click OK.

Steps to follow for Deleting standard checkpoint:

Identify Checkpoint statements and right click -->choose delete option.

Inserting Standard check points through active screen:

View -->Active Screen -->Cursor should be placed in desired location -->Mouse pointer is placed on active screen--> right click-->choose insert standard checkpoint option -->click OK -->enter expected result -->click OK






Example--

total=DataTable.GetSheet("Action1").GetRowCount
msgbox total
For i= 1 to total
    DataTable.SetCurrentRow(i)
    a=inputbox("Enter value")
Browser("Sign in to Yahoo").Page("Sign in to Yahoo").WebEdit("login").Set a
Browser("Sign in to Yahoo").Page("Sign in to Yahoo").WebEdit("login").Check CheckPoint("login")
Next

Wednesday, 17 September 2014

QTP - CheckPoints

What are CheckPoints?

Checkpoints, as the name says it all, it refers to a validation point that compares the current value for specified properties or current state of an object with the expected value which can be inserted at any point of time in the script.

Types:

TypeDescription
Standard CheckpointVerifies the property values of an object in application under test and supported by all add-in environments.
Bitmap CheckpointVerifies an area of your application as a bitmap
File Content CheckpointVerifies the text in a dynamically generated or accessed file such as .txt,.pdf
Table CheckpointVerifies the information within a table. Not all environments are supported.
Text CheckpointVerify if the text that is displayed within a defined area in a Windows-based application, according to specified criteria.
Text Area CheckpointVerifies if the text string is displayed within a defined area in a Windows-based application, according to specified criteria.
Accessibility CheckpointVerifies the page and reports the areas of the Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines
Page CheckpointVerifies the characteristics of a Web page. It can also check for broken links.
Database CheckpointVerifies the contents of a database accessed by the application under test.
XML CheckpointVerifies the content of the .xml documents or .xml documents in Web pages and frames.



Example:

The checkpoints are added for the application under test - "http://easycalculation.com/"


' 1. Inserted Standard Checkpoint
Status = Browser("Math Calculator").Page("Math Calculator")
.Link("Numbers").Check CheckPoint("Numbers")

If Status Then
   print "Checkpoint Passed"
Else
   Print "Checkpoint Failed"
End if

' 2. Inserted BitMap Checkpoint
imgchkpoint = Browser("Math Calculator").Page("Math Calculator")
.Image("French").Check CheckPoint("French")

If imgchkpoint Then
   print "Checkpoint Passed"
Else
   Print "Checkpoint Failed"
End if