Log version number in an app
Hello,
I am new to the scripting so sorry for this kind of questions, i am trying to log the current version of the desktop app, but can't find a way how to do it.
So i have an app that has a version (picture Version.png). The i try to select it, i can only select the whole line and that makes my object look in NameMapping like this:["Sys"]["Uvs_WinPos"]["HwndSource_Cashier_480x320"]["Cashier_480x320"]["ActiveItem"]["TextblockVersija10740429807"].
And then i made a script that checks that version contains the desired Text: ["Uvs_WinPos"]["HwndSource_Cashier_480x320"]["Cashier_480x320"]["ActiveItem"]["TextblockVersija10740429807"], "Text", cmpStartsWith, "Versija:");
But the i change the version i am getting this kind of error: Unable to verify a value with the property checkpoint, because the target object does not exist. 11:21:31 Normal 0.00.
So how can i get the version number from that block no matter what it is and log it ?
Best regards,
Dainius
I see your problem right away in your Version2.png.
You are using the property WPFControltext and the value you have in your mapping is the version number that keeps on changing.
I would do two things for your mapping.1) Rename the mapped object from TextblockVersija10740527226 to simply TextblockVersija. Be sure you also delete all other mappings of the object as they are, essentially, useless
2) Edit the properties. Delete the "Name" property. It's generally unecessary. And edit the WpfControlText property and, in the value, replace "1.0.7405.27226" with the asterisk (*) symbol. This wildcards the version number. The mapping will find the object based upon the ClrFullClassName and the Control text that contains the word Versija.
The general principle to learn is that, when mapping objects, you need to make sure that the properties you're using are not changing from one version to the next. If they are, you have two choices. Either select a different set of properties or wildcard the section of the property value that is changing.
Please let me know how this works.