How to capture dynamic objects in qtp like mark up text

Answers were Sorted based on User's Feedback



How to capture dynamic objects in qtp like mark up text..

Answer / sanju

by usng smart identification method or by using descriptive
programming

Is This Answer Correct ?    6 Yes 4 No

How to capture dynamic objects in qtp like mark up text..

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

How to capture dynamic objects in qtp like mark up text..

Answer / kiran

By using SETTOPROPERTy & GETTOPROPERTY methods

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More QTP Interview Questions

What is the use of ordinal identifier in qtp?

0 Answers  


Hi ,Can any one pleas explain how to test splash objects using QTP?

0 Answers   Value Labs,


What is the use of sendkeys and what are send keys

0 Answers  


if there r 10 windows open in QTP write a command to close all 10 windows at a time ?

10 Answers   Wipro,


i have qtp 9.5 ver software.but i don't know the license key. if anyone have license key please send it to my personal mail id(munir.reddy@yahoo.com

2 Answers  






How iteration is related to Test Results in QTP?

1 Answers  


How to record right click of a context menu and click on the selection ?

3 Answers  


Your roles and responsibilities and daily tasks? (As automation tester)

0 Answers   Oracle,


Hi All, I am 4 yrs experieced in manual testing and new to automation tool QTP. Iam trying to learn it thru online and material i have.I am able to understand but unable to trace out which method or function to be used where necessary in VB Script. How come we know the functions or methods to be used to open a window when clicking on button or so...Pls suggest me.How can i proceed further to apt VB Script.

0 Answers  


Can any suggest me what is exposure testing?

0 Answers   Value Labs,


wat are views in qtp explain

3 Answers   IGT,


Is there anyone can tell me where I can download free or trial QTP? I tried HP website, it was not there anymore. If someone know, pls send me URL. Tks...

1 Answers  


Categories