Defined Output variable from Test Script to Visual
I'm a bit confused, I've searched around help and just can't get my head around this-
I have a test script that captures text in a window (don't ask why - complicated infragistics nonsense that I'm trying to workaround!) and a function that compares the captured text to the text I am looking for and if found returns a value - I've tried boolean and I've tried text - it works within the test script but when I need to pass the result back to the visual test I'm calling it from I can't work out how the defined test script variable (as found when you click on the test script and go to Edit>Define Test Script Variables) passes it there.
I can create a whole new variable in the Define Test Script Variables dialog, that can only be text or number but is unconnected to the script I just wrote - ie, having just returned a boolean true, or a text found ="Yes" to a variable in the test script I can't then pass it to a variable in the visual test. The trouble is that it's so confusing - you have variables in the test script, the ones you define as inputs and outputs which are an entity to themselves, and a whole another set of local variables in the visual test! I've tried so many things but can't get them hooked up and don't know where I'm gong wrong! Inputs I'm fine with, I can get them going fine....its the Out that's not clear.
This is my script as converted to string based rather than boolean as I just wanted to take an extra complication away
he result is that it DoesTextExist returns Yes.....good, now what on earth do I need to do to get 'Yes' to my visual test so that I can decide what to do with that information??? I've tried different variable names to DoesTextExists, the same variable name, but nothing works.
Dim DoesTextExist As String
'DoesTextExist = False
DoesTextExist = text()
Function text() As String
Dim captext As String
Dim temp As String
DotNETForm("Sage Practice Solution - Main Application DotNETForm").Attach
Re: Defined Output variable from Test Script to Visual
In your VT, double-click the line that calls TS. Properties of that line will be shown, with all the variables to and from TS listed. You should see there's Output variables where it says "pass contents of ... into" - put your VT local variable here. You can also check the help file on this topic.