Forum Discussion

srinivas_yadati's avatar
srinivas_yadati
Occasional Contributor
11 years ago

Is There Is any way to find the inner text of particular object

Hi

I have some tasks after ececution they showing in a grid have many fields as columns 

one particular filed is status of the task(completed normally,completed abnormally,error occured .....) now i want to validate those status and grab the value (text )of that status field.

can we have any methods in test complete to grab values

5 Replies

  • It's just a property of the object (cell, field, textbox .... whatever). Just grab that property at the appropriate time. This is pretty basic stuff!



    eg. Looking at one object in my web application (in Chrome), I could take any one of the following properties during the run to get it's text content:



    contentText

    textContent

    innerHTML

    innerText

    outerText

    and even outerHTML if I wanted to parse it and make life difficult for myself.
  • srinivas_yadati's avatar
    srinivas_yadati
    Occasional Contributor
    Hi Colin McCrae

    Thanks for Reply,



    Actually i am testing Desktop application(javaFX) and this is not fecthing the output from above mentioned methods.

    for a command its produces the output to particular tab in desktop application,under this tab there is a text box(text area), i tried  to spy the object but our test complete is able to find the outer box ScrollPane ,the methods u mentioned are not working here.(May be they are for web application)

    i hope u understand the scenario.
  • OK. So the problem seems to be the properties available from the object.



    In which case, you need to post up full details of the object. Impossible to say what is or isn't available without this ....
  • srinivas_yadati's avatar
    srinivas_yadati
    Occasional Contributor
    Hi

    i am providing the screenshot of the problem image ,here i  want to find the value in the text area under output tab.



    spying oblject is going to the total scrol pane (White box ) under out put tab.
  • lol



    It's the object as it appears to the object spy people will need to see. That area of the screen could be anything. If we have some idea what TestComplete is seeing it as, someone may be familiar with that type of object and be able to help out.



    So a screenshot of the object spy properties might be more useful .... ;)