Forum Discussion

DainiusA's avatar
DainiusA
Contributor
5 years ago
Solved

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

  • m_essaid's avatar
    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 ?

    • DainiusA's avatar
      DainiusA
      Contributor

      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's avatar
        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.