Series: Subject: Topic:
Question: 1510 of 1523

How to handle dynamic objects in QTP?

Asked by: Interview Candidate | Asked on: Aug 31st, 2005
Showing Answers 1 - 25 of 25 Answers

Answered On : Aug 4th, 2005

To handle dynamic objects, with the windows scripting using the DOM Funda, first of all capture the desktop, then the browser and then all the inner objects in it. 

Login to rate this answer.

Answered On : Aug 17th, 2005

USE THE CONCEPT OF MODIFYING OBJECT DESCRIPTION: by changinf the property that Quick test uses to identify that object. for example:object repository learnt an image propert , object name or image is dynamic, in such case you can use a property which identifies the location of object on your AUT.

Login to rate this answer.

Answered On : Aug 25th, 2005

I think thats not the answer.Using regular expressions u can solve this problem.

Login to rate this answer.
Saraswathy & Mercy

Answered On : Aug 27th, 2005

Yes  2 Users have rated as useful.
Login to rate this answer.

Answered On : Aug 30th, 2005

Dynamic object is an object which changes its properties at the run time and thus its mandatory properties cant be predicted from the starting. To automate these objects, properties objects should be used. Here a property object is created using the description class. Set Obj1 = Description.Create() n then you can assign the name and title values to this custom object and these values can be captured during the runtime and hence using these values this custom object will identify the dynamic object in your application.

Login to rate this answer.
Suresh Chatakondu

Answered On : Aug 31st, 2005

Regular Expression solves the problem of dynamic values in QTP.  Suresh

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Oct 7th, 2005

Using GETRO Property we will handle the runtime objects.

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Jan 20th, 2006

Regular Expressions solve this at the most

Login to rate this answer.

Answered On : Sep 15th, 2006

Yes,By using regular expressions we can handle the dynamic objects

Login to rate this answer.
Mahesh Gupta

Answered On : Sep 25th, 2006

I have to ask how can I test " The images which changes dynamically" in the web page eg . - yahoo / rediffmail page 

Yes  3 Users have rated as useful.
Login to rate this answer.
Shrinivas G

Answered On : Oct 6th, 2006

I got to go through lot of website and QTP help regarding handling the regularised expressions.In my App, the dialog box caption (Fax Order No. 18) is changing constantly . I have changed the properties 1. title to "Fax Order No. *"2. regexpwndtitle to "Fax Order No. *" in the object properties.But it's still not working. Can anybody help me in this regard?Thanks in advance -Shrinivas

Yes  1 User has rated as useful.
Login to rate this answer.
sohaib mirza

Answered On : Dec 29th, 2006

Hello,You suggested regular expression but I am unable to employ regular expressions as values for object properties. eg I have an object which has a property "value". I wanted to specify regular expression for value but QTP doesn't keep it. Object.Select(value) doesn't accept any regular expression.I know regular expressions can be beneficial for checkpoints or synchronization points.

Login to rate this answer.

Answered On : Apr 9th, 2007

View all answers by harish_r9

As suggested you can use regular expression. You can slightly modify regular expression as follows:"Fax Order No. . *"I would like to answer the question "How do we test dynamic objects". As suggested by Saurab we basically use descriptive programming to test a web page with dynamic objects. Let's take an example:If a web page has a button which depending on certain condition it's caption changes between Yes|No. Then we write code some thing like thisif Browser(....).Page(...).WebButton("value:=Yes").Exist Then     MsgBox "Yes button exist"else if Browser(....).Page(....).WebButton(value:=No").Exist Then     MsgBox "No button exist"End ifI hope the above example answered your question.  

Login to rate this answer.

Answered On : Apr 10th, 2007

By using Regular Expressions or GetRopropery you can handle.

Login to rate this answer.

Answered On : Jun 27th, 2007

We can handle the dynamic objects using regular expressionBut, to handle dynamic link we have to use herf property

Login to rate this answer.

Answered On : Aug 21st, 2007

Can u elaborate handling of dynamic links  Here is scenario  Created userSavedClosed Search created user the searched result is displayed as a Link (emailed)The user details displayed while Clicked on EmailID  

Login to rate this answer.

Answered On : Jan 21st, 2008

View all answers by amul2007

QTP genrally identifies an object by matching its test object and runtime object properties. It may fail to recognise dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Object Identification/Recognition, wherein it can identify the objects even if their properties changes during run time.

Login to rate this answer.

Answered On : Feb 8th, 2008

View all answers by sp_kumar_in

Friends,The question how to recognise an object which is dynamic.? Not clear how can we implement regular expression.We can use if you know part of the string which is of name of object or name of the property then we can use reg expression? How can we use for dyn objects...Please clarify me?Regards,Raj

Login to rate this answer.

Follow this waySet Ob=Description.CreateOb("name").value="Image"Ex:    Browser("name:=My Browser").Page("title:=My Page").Ob.ClickNote:  Change the Property value at Bolded word("Image")

Login to rate this answer.

Answered On : Nov 22nd, 2008

View all answers by SanthanCh

By Using Object Identification method - "Ordinal Identification", we can handle the dynamic objects.

Login to rate this answer.

Answered On : Jul 8th, 2010

View all answers by amitdbest

Use Regular Expression or Descriptive programming

Login to rate this answer.

Answered On : Jul 28th, 2011

View all answers by testingcareer

To handle any dynamic objects, we can use "GetROProperty" and "Text Output Value" methods of QTP.

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Dec 7th, 2011

Use .* in place of title of the webpage enclosed in quotes. here '.'"(dot) means any character and'*"(star) means any number of characters. so for any kind of title it works.......

Login to rate this answer.

Answered On : Jul 16th, 2014

Fax Order No.*
(no space in between . *)

Login to rate this answer.

Answered On : Jul 21st, 2014

View all answers by koti_rao

If object text string changing dynamically to handle the by use Regular Expression or Descriptive program is the correct method

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.