![]() |
| |||||||
Testing Anywhere Post messages and questions related to Testing Anywhere here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
To send back a user defined value from a vbScript to the Run Script command use within your vbscript the following command: Code: wScript.StdOut.WriteLine <ValueToReturn> Code: wScript.StdOut.WriteLine "Hello World" Creating the vbScript 1. Create a vbScript using notepad and call it HelloWorld.vbs 2. Place the following statement within HelloWorld.vbs Code: wScript.StdOut.WriteLine "Hello World" Creating an example test in Testing Anywhere 4. Start Testing Anywhere client 5. Create a new test script in testing anywhere client 6. Add a variable to the script using the variable manager and give it a logical name for example ReturnedValue 7. Add the Run Script command and select the HelloWorld.vbs vbScript 8. Click in the text box next to the text Return value : 9. Press F2 10. Select the ReturnedValue variable 11. Click on Insert 12. Click on Save 13. Add a Message Box command 14. Click in the text box beneath the text "Please enter message to show to user" 15. Press F2 16. Select the ReturnedValue variable 17. Click on Insert 18. click on Save 19. Save the created test script 20. Now run the test. You should see the text Hello World appear on the screen within a message box. A working example has been attached to this post. |
![]() |
| Thread Tools | |
| Display Modes | |
| |