RR and vbscripts and COM
I started my little pilot project in testautomation with vbscript. I call a file which has the data and build a loop around that script. Everything works fine except the fact that I can not GET the string that appears in a window-gui each time the loop runs.
So I use RR to do the job. It is possible! That´s fine. But with the mechanism using a batch file ((*.bat) containing the …RTrobo.exe… command line) each time per loop is a very very SLOW thing to do. I call the batch file each time. RR starts and executes its script. Then RR has unfortunately to be closed (instead of resides in memory). Vbscript starts to send the next data. And everything restarts.
1) Is there anyone out there who can tell me if there is a chance to use COM Objects in SQA-Language? i.e. can I use my vbscript code in RR by telling RR that there is vbscript code following.
2) Can a pass parameters from SQA to a vbscript? If yes, how can I do that?
I know how to start vbscripts. But that will not answer the question. Because then I have to generate tons of similar vbscripts with each of them having another testdata in it. That´s not Automation-like and no one will administer tons of scripts. ;-)
Thanx in advance
Re: RR and vbscripts and COM
Answer my own question! Cool, eh?
acc. question 2) Yes, you can. Here is an example:
StartApplication "wscript Z:\test.vbs 470006684"
(The number behind the space is the parameter(=470006684)!)
'generate an object like this
Set objArgs = WScript.Arguments
'replace the hard coded line like this
channel.RpcSetString WScript.Arguments.item(0), "ContractNumber"
'before that the line looke like this:
channel.RpcSetString "470006684", "ContractNumber"