How to capture dynamic objects in qtp like mark up text
Answers were Sorted based on User's Feedback
Answer / sanju
by usng smart identification method or by using descriptive
programming
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / deven
To capture the value of a dynamic object in a web
application GetROProperty method is executed. In order to
capture the value of an object and that too of a dynamic
object then we will use the GetROProperty which means Get
Run Time Object Property and we need to decide which
property we want to capture. This can be text innertext etc.
I would list down a sample code for gmail to count unread
emails from any account.
Since the inbox count is dynamic and ever changing from
account to account i have used descriptive programming so
that this piece of code can be run for any gmail account.
The prerequisite is that you log in to your gmail account
and then run this script
This script prints the number of unread emails in the inbox.
inboxcount = Browser("title: Gmail.*").Page("title:
Gmail.*").Link("innertext: Inbox.*").getroproperty
("innertext")
If inboxcount = "Inbox" Then
Print "No Unread Emails"
ExitAction
Else
emailcount = replace(inboxcount, "Inbox","") 'replaces
inbox with space
emailcount = trim(emailcount) 'removes all the spaces
emailcount = replace(emailcount, "(","")
emailcount = replace(emailcount, ")","")
Print "You have "&emailcount& " unread emails in your inbox"
End If
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the DIFF Between PROJECT AND PRODUCT?When Company will need Product?
how do u handle an object with out name in our application using QTP 9.2?
I want to export the datasheet to excel.Instead of total file it exports only data without headers.How to solve this problem?
How To write script in QTP For Field Validation Example: password Field is accepting A range 8-20 characters only.How to write script?
How u prepare Test result summary in QTp?
Could anyone please tell me one situation where you have used recovery scenarion in real time with an example?
your doing one project testing then how u know itis wheather web based application or windows based application?
what to do if application have 3 "ok" button with same logical name and same properties, how qtp can identify them.
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?
Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.
How to create a Runtime property for an object in QTP?
What is the difference between a Function and Procedure in QTP?