Xpath object identification is a new feature in QTP 11.
Dim oPage
Set oPage=Browser("name:=Google").Page("title:=Google")
oPage.WebEdit("xpath:=//INPUT[@name='q']").Set "advancedqtp"'Entering value in Google textbox.
oPage.WebButton("xpath:=//INPUT[@value='Google Search']").Click'Clicking Google Search button.
Identifying using Id attribute
1. obj.WebEdit("xpath:=//input[@id='htmlID']").Set "QTP"
Identifying using Type attribute
1. obj.WebEdit("xpath:=//input[@type='text'][1]").Set "QTP"'Setting value in first textBox
Identifying using Tagname
1. obj.WebList("xpath:=//select[1]").Select "London"'Highlighting first listBox
Identifying using Innertext
1. obj.Link("xpath:=//a[.='Google']").Click'Clicking Google link
Identifying WebTable based on Rowcount
1. obj.WebTable("xpath:=//table[count(.//tr)=2]").Highlight 'Highlighting the table which has only two rows
http://unmesh.me/2011/11/16/using-dom-xpath-css-for-object-identification-in-qtp-part-1/