Ask a Question

get version text from app

SOLVED
DainiusA
Contributor

get version text from app

I have an app there the version is changing frequently and i need to get it all the time to check what version it is on right now.

The problem is that the text of the app is on the same white background in NameMaping and i can't change it, because it is one element. (Capture.png)

As well i can take the current version from my DB table. But i can't find the way to insert the variable to the test, because then i pass the login page the version title will dissapear.

Maybe there is a way to insert my variable from DB table into a script so i can get the current version ?

 

TestComplete v 14.0.308.7

I am new to all of this so i am not sure if i am explaining everything clearly. So if you need any more information just let me know.

Thank you very much.

6 REPLIES 6
m_essaid
Valued Contributor

Hi,

I'm not sure to have understood everything, what happens when you spy the label with spy object ?

Can't you get the ".caption" property of your label ?

When i try to spy the label with spy object i get the whole window that is in the capture.png that i have attached.

i don't know what do you mean by  ".caption" property. But if you mean that if i can to highlight the text section. i can't do that, because i always end up getting the same result like in the attached image.

m_essaid
Valued Contributor

Ah, ok, try the following : paste the WndClass of the object containing the label into Project properties\Open Applications\MSAA (add it to the list) and restart TestComplete.

You may be able to spy the label.

Hi,

 

Alternatively, you may try the Version property of the AppInfo object: https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/misc/appinfo/version...

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
TanyaYatskovska
SmartBear Alumni (Retired)

Hi @DainiusA,

Do the suggestions given here help you resolve your question? Please mark the best answer as a solution.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Sorry i was a bit off of the project. But i found another Solution for now. I might get back to this question a bit later though. Thank you for reminding me to close the topic.

cancel
Showing results for 
Search instead for 
Did you mean: