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

1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?

0 Answers  


I want to run my qtp scipt on the system where qtp is not installed .I don't want to install qtp but i want that system should use the qtp from another system in lan just the qtp instance should be launched on that system without having qtp installed on it .I probably know the solution that it will be solved through RMI but how to get this problem solved plz help i anyone know the answer

4 Answers   Cimcon,


How to merge the two object repositories

3 Answers   Wipro,


HI. Plz Clarifie my doubt,having 2+yrs experience in Testing , But My accedamics(Xth,INTER) are Less than 60%, But B.Tech 72%. It creats any problem , When i change to any MNC. plz tell me......... lot of friends told it's a problem, Some people says NO problem, What .............

3 Answers  


how to capture tool tip in QTP and which check point is needed

2 Answers   Syntel,


Could anyone please tell me one situation where you have used recovery scenarion in real time with an example?

4 Answers  


I have a 10 lines of qtp script, while executing i got an error at line 7 but i dont want to stop the execution i want to continue the execution up to last line and display the test result window, wts the syntax we use?

3 Answers   BirlaSoft, Collabera,


In QTP, Which are the concepts are needed to do Functional testing and Regression testing?

3 Answers   IBM,


Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also

0 Answers  


Is it possible to use two instances of UFT on the same machine? If not why?

0 Answers  


What is runtime objects and test objects? What is the difference between them?

7 Answers   IBM,


I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2

0 Answers   Livetek,


Categories