I am testing a form. Below is a part of it (without divulging any confidential information).
The two fields (city and state) are located by
["SwingObject"]("HighlightField", "", 3) and
["SwingObject"]("HighlightField", "", 4)
I am fairly certain I have located the elements, and I would like to figure out how to determine the value (i.e, "CHICAGO" and "IL") from the element. I have tried a few things. I would like to put these into string variables so I can compare their output to something.
Again, please see attached image.
If you use the object spy https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-spy/index.html?q=... you can examine the components themselves and look at the various available properties. I'm assuming that somewhere in those properties is something like "Text" or "Caption" or "wText" or "Value" or something to that extent which will contain what's in those fields.
With that, you can then use an Object Property Checkpoint https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/property/index.html to validate the value of the property and return a pass/fail on it.
Did you find the property you can use? If you haven't, make sure that you are using the Advanced view mode in The Object Browser to see all properties. Refer to the following articles for details:
I tried several objects (different levels) and different properties, but all I got was like COM_OBJECT as a string. Something that provides more information I just realized. This window that opened from which I am trying to get text is a web page via Internet Explorer. But I am not using Selenium or I would know how to do it.
Is this page available on the Internet? please give us a link.
I just want to understand if you need any more assistance. Was the issue resolved?