Micro Focus QTP (UFT) Forums
A tricky QTP Question - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: A tricky QTP Question (/Thread-A-tricky-QTP-Question)

Pages: 1 2


A tricky QTP Question - Prabhakar - 07-24-2012

How to perform action on objects, If two objects have the almost the same name ?

example :
Object 1 : "EDI New Items"
Object 2 : "Items"

Whenever I ask QTP to perform an action on Object 2 it performs action on Object 1.

Note: The two objects are present in an Oracle Application tree.


RE: A tricky QTP Question - K Gaurav Varshney - 07-24-2012

Hi Prabhakar

Save the objects with different logical name in the object repository then use them in your code.

Regards,
K


RE: A tricky QTP Question - Prabhakar - 07-24-2012

Hi Gaurav Varshney

Even if I change the logical names Same issue occurs, Since it is in a tree format.


RE: A tricky QTP Question - K Gaurav Varshney - 07-24-2012

Can you pls share the object spy screenshots.


RE: A tricky QTP Question - Prabhakar - 07-25-2012

Hi ,

I have attached the screen shot of object repository. Kindly find it and help me.


RE: A tricky QTP Question - supputuri - 07-25-2012

HI Prabhakar,
If my guess is correct there might be some regular expression used in your script or OR. Checkout for that and turnit off, becareful before doing that. Do the impact analysis. If you want I will help you , to achieve the backward compatibility.


RE: A tricky QTP Question - Prabhakar - 07-25-2012

hi supputuri ,

Ya sure help me out... How to proceed ??..
I am using QTP 11 and an Oracle application with jinitiator in windows 7 OS.


RE: A tricky QTP Question - supputuri - 07-26-2012

Did you checked your code and OR for any regular expressions?


RE: A tricky QTP Question - Prabhakar - 07-26-2012

Hi,

This is my code ...

Code:
OracleFormWindow("RMS Start Menu").OracleTree("Contents Of Items").Select "Items"
OracleFormWindow("RMS Start Menu").OracleTree("Selected item := Items").Select "Items"

I don't know to check regexp.

**NOTE: 'Selected item' is the property . Got it by using object spy.


RE: A tricky QTP Question - supputuri - 07-26-2012

hi Can you share me the screen shot of the Object Spy for "Items" child tree object.