XPath Based QTP Object Identification - Codoid
Select Page
Codoid Blog

XPath Based QTP Object Identification

Irrespective of the business that your client is in, marketing is an integral part of their operations. In fact, in this day and age of social.

XPath object identification is a new feature in QTP 11. We would like to share an example for it using Google web page.

Code

Dim oPage:Set oPage=Browser("name:=Google").Page("title:=Google")

'Entering value in Google textbox
oPage.WebEdit("xpath:=//INPUT[@name='q']").Set "advancedqtp"

'Clicking Google Search button.
oPage.WebButton("xpath:=//INPUT[@value='Google Search']").Click
  

Written By

Submit a Comment

Your email address will not be published. Required fields are marked *


XPath object identification is a new feature in QTP 11. We would like to share an example for it using Google web page.

Code

Dim oPage:Set oPage=Browser("name:=Google").Page("title:=Google")

'Entering value in Google textbox
oPage.WebEdit("xpath:=//INPUT[@name='q']").Set "advancedqtp"

'Clicking Google Search button.
oPage.WebButton("xpath:=//INPUT[@value='Google Search']").Click