Thursday, December 5, 2013

Issue in replay due to redirections

If your application uses URL redirections, you may encounter issues during replay if the redirection depth is set to zero. For example, you may see an error message like this: "Action1.c(x): Redirecting "https://www.easyloadrunner.com " (redirection depth=0)" followed by "Action1.c(x): Error: Failed to connect to server..."

To resolve this issue, there are two ways to change the value of the redirection depth. The first method involves modifying the configuration file. Here's how to do it:

1. Go to the \template\qtweb directory.
2. Open default.cfg using a word editor.
3. Look for the [web] section.
4. Add an entry for MaxRedirectionDepth.

Set MaxRedirectionDepth to the desired number of redirections (e.g., MaxRedirectionDepth=x, where x is the number of redirections desired).

Repeat the above steps for the default.cfg file in the script folder as well.

The second option is to use the web_set_option function in your script. Here's an example of how to do it:

web_set_option("MaxRedirectionDepth", "4", LAST); // This sets the maximum redirection depth to 4.