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.
Try it and enjoy
Hi,
ReplyDeleteAny input on how to get a xpath value using QTP 11, when we spy our application we are not getting any xpath value in the property list. Please le me know is there any other approach to get the xpath value from QTP 11.
Thanks in advance.
Please answer the above question.
ReplyDeleteAny input on how to get a xpath value using QTP 11, when we spy our application we are not getting any xpath value in the property list. Please le me know is there any other approach to get the xpath value from QTP 11.
Thanks in advance.
ReplyDelete
QuickTest uses XPATH/CSS identifiers only when identifying objects and not when
ReplyDeletelearning objects. Therefore, they are not available from the Object Spy or
the Object Identification dialog box.You can add an object using Add object to local, and then for complex web objects to be identified more accurately you can add Xpath or CSS property after adding the object to Local and deleting Ordinal Identifiers.While learning the object you cannot find the Xpath or css property.
Hi,
ReplyDeleteFor more Information on this follow below Blogspot:
http://learnuft.blogspot.in/
Regards
Hi,
ReplyDeleteThis is Firoz, currently working on XPATH and CSS in QTP.
Here is How I Do:
In QTP we dont have direct facility to find the XPath for an object. We have another method called IE Developer Tool Bar, That is as follows :
Click F12 in IE or Chrome. This shortcut(F12) is for IEDeveloper Tool bar.
A new window will be opened clearly showing the html view of the current page ...
A Pointer tip will be there. Click on the Pointer and goto your object and click on it. while hovering only you will get a border line surrounding your object.
then apply xpath or css using these properties.
for more information contact me : firozshaik27@yahoo.com
Hi All,
ReplyDeleteI want to know that can i use XPATH for locating elements in QTP-10, specially QTP-10, if yes please share your taught s and example.
Regards
Shivanand H