Information:

Environment

  • Dynatrace Recorder

 

 

Solution

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:

  1. Use IE to navigate through the transaction.
  2. Monitor the Logout step. The logout URL should use one of two methods: HTTP POST and GET
  3. Copy the logout URL.
  4. 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.
  5. 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.
  6. 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.
  7. Save the script.
  8. Play the script back. If it fails before the logout, the application account may be locked.

If the application account is locked:

  1. In the Dynatrace Recorder, view the login sequence from the FAIL PLAYBACK AREA.
  2. Capture the cookie's information.
  3. Open the log out script.
  4. Search for the prescript tag.
  5. 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.
  6. Save the script.

 

 

 

 

 

  • No labels