Forum Discussion

thoshima's avatar
thoshima
Occasional Contributor
5 years ago
Solved

How to searching particular word on particular window/screen using Testcomplete.

Hi All,

 

I came up with one more query. 

 

My Query: 

I have a Desktop Application and in one particular screen i want to search for a particular word using Testcomplete.

 

Could any one please help me on how to search for particular word in particular screen using Testcomplete script Mode.

6 Replies

  • mmccollum's avatar
    mmccollum
    Occasional Contributor

    If you have a specific location that you can get the alias of you can grab the wText or value of it then just

    s = Aliases.java.MainWindow.null_layeredPane.ContentPane.SwingObject("JEditorPane","",0).wText

    if "MyText" in s:

       Dostuff()

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi,

    Identify the object that contains the property you need. For example, an Edit that has the property wText.

    Then map your object and test its property's value within your test.

    Use the object spy first to find the wanted object.

    • thoshima's avatar
      thoshima
      Occasional Contributor

      Thanks,

       

      Im trying this method, will let u know regarding this.

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Thanks Community for a lot of useful information! 

         

        Hi thoshima , have you tried any of the suggested approaches? Has it been a success?