Forum Discussion

mac's avatar
mac
Occasional Contributor
5 years ago
Solved

Keyword Test - Get new Id value from textbox

I apologize ahead of time in case the answer to my question should be obvious.  I have not been able to find it.   I want to run a desktop app that creates a new widget.  Once the widget is saved, ...
  • tristaanogre's avatar
    5 years ago

    So, you're doing a Keyword test.

     

    Well, what you're going to want to do is use a Set Variable operation to create and set a variable to equal to a property value.  In that operation, you'll select, for the value, an Onscreen Object Property and then use the picking control to grab the object and find the appropriate property.

     

    Writing out to a file is a bit trickier, I'm afraid.  There is a "Save to File" operation but I think that would overwrite the file every time rather than append to it.  

     

    So, instead, use the "Call Object Method" operation and find the aqFile object.  Then use the WriteToTextFile method and fill in the appropriate parameters as per https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/writetotextfile.html

     

    The "String" would be the variable that you created with the content.