I recorded an LR script LRver12.01 using TruClient Ajax - IE that just navigates to a application URL. Basically when the URL is opened a session a created for the application in the backend server. Using IE11.
The businesss case is to simulate users carrying out a number of iterations of this test. So basically for each iteration a session would be created and then disconnected for the application.
When I try to replay this script, I notice that if I ran it with mutiple iterations, for each iteration LR creates a new session for the application but does not close the previous session that was opened by the previous iteration. It is only when the LR script replay completes, that all the sessions gets disconnected that were opened by the iterations in one go. If I were to replicate the same manually via the browser, then on closing the browser immediately the session gets terminated on the backend.
All that I have in the LR script is a step to "Navigate to........ the app URL" . The End event for this step is set to "Automatic: Document Loaded". I added the Generic Browser Action step from Toolbox "Close Active Browser Window" with the End Event as "Automatic: Not Set Yet", but it didnt seem to still disconnect the session on replay.
Any inputs to resolve the same would be highly appreciated.