cancel
Showing results for 
Search instead for 
Did you mean: 

Cloned name mapping object properties references project variable from original project

Highlighted
Occasional Contributor

Cloned name mapping object properties references project variable from original project

Ok, having a bit of an issue here...

 

I have a shared name mapping project item across all my TC projects.  Some of the name mapping object properties are mapped using a project variable called NameMappingStr.  I have the same project variable setup in all my projects.  During test execution I set the NameMappingStr value (followed by a call to refresh mapping info) which allows me to dynamically set object identification properties and interact with dynamic content on a web page.  Here's the problem, it appears the name mapping object property in Project B is looking at the NameMappingStr value from project A.  So when I set NameMappingStr in project B the value is ignored.  I believe this is because the name mapping project item for Project B was cloned from Project A and is holding a reference to the NameMappingStr variable in project A.

 

I can't seem to find a way round this at the moment.  Ideally I would like to have the NameMappingStr variable set at project suite level rather than project level but I don't think name mapping object properties can reference project suite variables.

 

Has anyone else come across this and devised a work around for this.  Happy to explain further if required....

 

Cheers,

Chris.

2 REPLIES 2
Highlighted
Community Hero

Re: Cloned name mapping object properties references project variable from original project

Project.Variables.<insert variable> is referencing the currently running project, I don't think there is way for it to reference another projects variable. Are you sure the variable just isn't getting set properly? Try logging the variable when it changes to make sure that's it's actually changing to what you expect it to. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Occasional Contributor

Re: Cloned name mapping object properties references project variable from original project

Thanks for the reply on this, apologies for not getting back sooner, just back from holiday...

 

Looks like this was a mistake on my part as I was setting the NameMappingStr project variable to the wrong value.  I spotted it straight away after my holiday....amazing what a difference fresh eyes can make!

 

Once again, thanks for replying cunderw! 

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors