Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smart Identification

Status
Not open for further replies.

MTek1240

Technical User
Mar 22, 2007
10
US
Hi All,

I can't find an answer anywhere. So here is my question:

We need to use a different “Object Trees” for one (the same) Object

Example:

We have one object – WebEdit(“username”)

There are different "Object Trees" involved (depending on the version of the application)

Here they are:

Browser("...").Page("...").WebEdit("username")

and

Browser("...").Page("...").WebTable(“Login”).WebEdit("username")

Sometimes WebTable is included in the tree...

So here are the questions:

How to IGNORE that?

If the answer is in the Tools --> Smart Identification --> Congure... Then: What kind of propierties is an "Object Tree"? And how to set it?

Thank you very much!
 
First off - I'm having to guess that you're using QTP.

Second I don't know if you mean the version of QTP or your own application when you say the object path varies with the version.

So, without further information I'll give you the best generic advice I can. Have you tried checking if the object (specifying its full path) exists? This will allow you to decide which one to use. Replace the object path with a variable, which, depending on the results of the object exists check, will be set to the relevant path.

Essentially -

1. Check if WebEdit exists
If it does then set ObjPath = WebEdit
else set ObjPath = WebTable.WebEdit
2. Replace instances of wither path in your code with the variable ObjPath.

Or - check your application version at the start, and adjust accordingly.

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
Thanks!

1. Yes I use QTP 8.2 :)
2. Version of our application.

I am going to try that. Thanks Alot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top