When running a script against a web application that requires a login, you may become locked out of your account for one of the following reasons:
- The last Login session didn't clear out of the cache. This sometimes happens when you close your browser without logging out.
- Your script generated a playback error and didn't log you out before closing.
Some websites require that you wait 15 - 30 minutes until the login session times out. However, others may wait for up to a day before clearing out login sessions. In other instances, you may need to have support unlock the account for you.
To determine how a website logs you out of their application, you will need to use HttpWatch for Internet Explorer (IE). Once this plugin is installed, perform these steps:
- Use IE to navigate through the transaction.
- Monitor the Logout step. The logout URL should use one of two methods: HTTP POST and GET
- Copy the logout URL.
- If the logout URL is using the POST method, capture the POST DATA string using HttpWatch. Note that this string has to be static in order for this solution to work.
- In the Dynatrace Recorder, create a new script for the transaction. Define the URL for the transaction's first step (Sequence 0) as the logout URL you recorded in step 3.
- If the logout URL is using the POST method, change the HTTP method for the first step to POST, using the POST Data String you captured in step four.
- Save the script.
- Play the script back. If it fails before the logout, the application account may be locked.
If the application account is locked:
- In the Dynatrace Recorder, view the login sequence from the FAIL PLAYBACK AREA.
- Capture the cookie's information.
- Open the log out script.
- Search for the prescript tag.
- Type document.cookie = ""; into the prescript tag, pasting the cookie information that you copied in step two inside the quotation marks. For example, if the cookie's information is "loggoutsession=44y65ythr5", then you would type document.cookie ="loggoutsession=44y65ythr5"; to the prescript section of the script.
- Save the script.