Forum Discussion
vik33, you should look at merging your namemapping files. Here is an article that shows how to do it.
djadhav Thanks for your reply. The only reason why i am doing all this is this - If i keep everything in one project my Object Repository (NameMapping) becomes quite large and then i start having issues like :
- object identification
- Project takes 4-5 minutes to open.
The application is based on JAVA Swing objects. I have to populate different windows from the main windows and it's hard to specify properties to all the windows so that no object identification issues occur (or i am not good at object identification techniques). So, i thought keeping different scripts in different projects means - every script will use its own NameMapping and will have no conflicts of object identification. But i guess, that's not right. Even if i refer any script from projectB from ProjectA, it would still use NameMapping of ProjectA.
Any other solution to this problem?
Thanks for your time.
-Vik
- djadhav10 years agoRegular Contributor
Since you have 2 different projects but you would like to refer ProjectA unit from ProjectB, it makes me think that both projects test the same application. If that is not the case, can you be more descriptive about your projects.
Q) Do both of your projects test the same application? If no, then why is there a need to refer a unit from ProjectA in ProjectB?
For the object from NameMapping of Project B to be found in NameMapping of Project A, there are only 2 options that I know of:
1) Merging the NameMapping. Or simply mapping objects of project B in NameMapping of Project A as well.
2) Use FindChild method in Project A so that object identification is in the code instead of the NameMapping file so when you refer to the unit from Project B, it carries along the object finding code. Here is how to use it : https://support.smartbear.com/viewarticle/69449/
- vik3310 years agoOccasional Contributor
djadhav Thanks again. Yes it is a same application and i am populating different windows from the main window. The only reason why i tried 2 projects method is :
As i automate more and more windows to populate, it's hard to maintain Objects in nameMapping and also, project becomes so big that it takes a while to even open it.
I will try to identify objects dynamically thru code. Can you show me an example of vbcode that identifies objects based on some properties such as titles (of the windows) or any other good properties that i can use. i am looking into findchild methods as well. Thanks,
Vik