Im using the recorder helper tool to update two fields into a csv file on the local machine for each row processed in the csv file in the data driven tab.
Here is the test case definition:
> loadvars || trips.csv
> open || https://d.u.com/p3/payments/v2/trips/${tripid}
> WaitForPageToLoad || 1000
> storeText || //body/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div[2]/div[2] || miles
> pause || 2500
> open || http://localhost:18910/execute?cmd=powershell c:%5cusers%5chp%5cMyScripts%5clogmiles.ps1 "${tripid} ${miles}"
> endloadvars
Here is the powershell script:
param ($tripid, $miles)
"$tripid,$miles" |
Out-File -FilePath c:\users\hp\downloads\tripmileage.csv -Append -Encoding ascii
write-host "$tripid,$miles inserted"
Here is the output from the java runtime:
2020-06-11 14:02:39.292 INFO 8288 --- [io-18910-exec-1] c.k.k.h.c.ExecutionCommandController : Process the command: 'powershell c:\users\hp\MyScripts\logmiles.ps1 "b3029bcb-e14a-429d-a19d-82b76a6aa052 4.2 mi"'
2020-06-11 14:02:39.293 INFO 8288 --- [io-18910-exec-1] c.k.k.h.c.ExecutionCommandController : The actual command is: 'cmd.exe /c powershell c:\users\hp\MyScripts\logmiles.ps1 "b3029bcb-e14a-429d-a19d-82b76a6aa052 4.2 mi"'
2020-06-11 14:02:39.703 INFO 8288 --- [io-18910-exec-1] c.k.k.h.c.ExecutionCommandController : Output:
b3029bcb-e14a-429d-a19d-82b76a6aa052,4.2 inserted
Here is how the browser after the open.
What happens is the process just stops after receiving the local host command output. If I go to the browser and hit the back button (taking it back to the page of the first open) it will execute the next row in the data directory. So if I keep hitting the back button it will continue processing. I have over 5000 rows to process im not going to go and hit the back button 5000 times. lol.
What am I doing wrong? I feel like its something simple. There is just very very little documentation on this stuff which is extremely frustrating.
Thanks in advance for any help someone can give me.
Thanks
Bill