obj.WebEdit("xpath:=//input[@id='htmlID']").Set "QTP"Identifying using Type attribute
obj.WebEdit("xpath:=//input[@type='text'][1]").Set "QTP"'Setting value in first textBoxIdentifying using Tagname
obj.WebList("xpath:=//select[1]").Select "London"'Highlighting first listBoxIdentifying using Innertext
obj.Link("xpath:=//a[.='Google']").Click'Clicking Google linkIdentifying WebTable based on Rowcount
obj.WebTable("xpath:=//table[count(.//tr)=2]").Highlight 'Highlighting the table which has only two rows
More examples will be added
Could you please clarify, what QTP versions support xpath?
ReplyDeleteQTP 11
ReplyDeleteHi,
ReplyDeleteIn my application there are two links with same name.
how to get the xpath for first link and second link .(" manage my cookies')
make sure clear all cookies.
url: http://www.hertzondemand.com/london
Hi ,
DeleteI am trying automate workflow application having number of web element where i want to click on particular web element but QTP is taking more than 3 min to run single line of script or fails to click.
Can it is possible identify web element with Xpath method for dynamic objects or web element
Is there any other method other than click ,to work faster.
Browser().page().frame().Webelement(AB11).Click
Browser().page().frame().Webelement(AB12).Click
Thanks in advance
Rajesh
Excellent Post.Also Visit http://www.whiteboxqa.com/WBQA/SEO/qtp-videos.php
ReplyDeleteIs it possible to use regular expression in xpath
ReplyDeleteI am having xpath using div
Bro().page().webelement("xpath:=//div[contains(text(),'"&variable&"')]. Here the variable is text. It's working great for all the text.
1 case, I have a text with ' - (e:g: Are you taller than 56') - In this case it fails, I can pass the string to specific characters,avoiding ',
however is it there any way to handle this dynamically?
Asiq Ahamed :
ReplyDeleteCould you please elaborate more on how to get the XPath from the Source code ??
(OR) How to identify the xpath of a particular object in AUT ??
Thanks in Advance.
To get Xpath use 'Firebug' add in, which is available for both Chrome and Firefox browsers........
ReplyDeletevery informative data about qtp codes i.e., identifying attribute, tagname, innertext QTP and QC Online Training Hyderabd
ReplyDeleteAwesome blog. It was very informative. I would like to appreciate you. Keep updated like this!
ReplyDeleteBest Data Science Online Training Institute In Hyderabad | Online Data Science Training
Data Science Online Training Institute In Hyderabad
Data science online training in hyderabad
Best data science training in hyderabad
Best selenium online training institute `
ReplyDeleteAwesome post !
ReplyDeleteAuthorized ipad service center in Chennai | Authorized ipod service center in Chennai | ipad service center in chennai | ipod service center in chennai | ipad service center in chennai | iphone Water damage service |
Thank you for posting such a nice post.
ReplyDeleteAuthorized iphone service center in Chennai | iphone service center in chennai | Mobile service center in chennai | Authorized iphone service center in Chennai | iphone service center in chennai | iphone glass replacement