Ask a Question

Same application on different OS giving different object spy results

SOLVED
Mark1
Contributor

Same application on different OS giving different object spy results

Recently we have started to test our application which has always been on 32 bit OS on 64 bit with a 64bit version of the application. However while the majority of the scripts writen originally for the 32bit version work on the 64 bit, we have found an instance where a button is not recognised as a button via the object spy when it is on 32bit and the code used for 32bit will not work when called to click that button on 64 bit. Is there any reason for this and way to fix it to avoid it should it appear for other buttons in the application? 

23 REPLIES 23

Both screenshots I have seen from you and another use have ObjectType in the name mapping property whereas mine is called NativeClrObject. Searching for ObjectType or ObjectIdentifier or IdStr as has been recommended dont show any results.
objectprop.PNG

It doesn't have to by ObjectIdentifier - it can be any property - or even a combination of properties.  That's just the most commonly used ones.  If NativeClrObject property finds the object, that's the property you should use


-------------------------------------------------
Standard syntax disclaimers apply
Regards,

Hi @Mark1 ,

 

can you enlarge the same image and send me ill tell you which all to add

 

Kind Regards,

Sathish Kumar K

32bit button.PNG63bit button.PNG

So these are my two buttons, both from the same exe ,one 32 bit one 64 bit, same button on both pcs. If I try and change the name of the NativeClrObject.Name to something like Cash* it gives me an error and says it cannot find the button10.

property should be same in both the proc..

only then the regular expression for the propValue will work 

 

check for the properties which are same in both the processes.

 

Kind regards,

Sathish Kumar K

 

Ah, it's starting to get a little clearer.  You aren't looking for a button called Cash* 

Iit apears the button is called button10 (this could also change based on OS), but more importantly, the button's container is called Cash*  in other words, the button may be mappable as button10, but the container needs to be mapped as Cash*  You need to follow the previous steps on adding wildcards to the identification properties, but apply it to the container that's called Cash*

 

so Name mapping will be something like Grid=>border=>Grid=>Cash*=>button10

@Krishna_Kumar 

 

Please be clearer on Regex versus Wildcards.  Adding an * in an identifier is not regex.  It is simply inserting a wildcard, while Regex has a specific syntax of "Regex:pattern" in TC - Edit that's a ":" followed by "p" - smileys - gotta love 'em

 

from Smartbear documentation:

Using Wildcards

You should probably look at the "Using Wildcards in Name Mapping

Using Regex

 


-------------------------------------------------
Standard syntax disclaimers apply
Regards,

Apologies for not being very clear earlier, I struggle with coding terminology at times. With that being said I am still not entirely sure what exactly I need to rename. Is it the NativeClrObject.Name, is it the Aliases , is it the mapped name item.

This is the error I get when I try to rename the button10

rename error.png

Nope, nope, wrong place 🙂

You can leave the mapped name on the left Mapped objects pane as Cash - you aren't allowed to use special characters in them.  What we are referring to is the Right hand panel where you tell TC how it should go about to find the mapped object.  Having said all that, I suspect that there may be two mapped objects under grid in the left pane.  With two different names.  Could you just post a screenshot of the expanded Mapped objects pane ?  If this is the case, you will probably need to get rid of one of the mappings adn use wildcard syntax in the one


-------------------------------------------------
Standard syntax disclaimers apply
Regards,

mapped.PNG

Button10 is the Cash button on 32bit and Control is the Cash button on 64bit

Ok.  In this case it appears you may have to entirely different buttons 0 they could have been autogenerated by TC is you use recording or have TC to automatically update mappings.  What do the identification properties (right hand pane) look like for the two buttons ?  It's possible that they are literally two different buttons.  Otherwise, it may be possible to get rid of button10 mapped object and just change the "Control" mapped object with the aforementioned wildcard replacements


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
cancel
Showing results for 
Search instead for 
Did you mean: