Highlighted
Acclaimed Contributor.
Acclaimed Contributor.
111 views

LR Support Tip: Issues in replay due to redirections

If your application have redirections in URLs then you might find some issues while replaying as shown below:

 

"Action1.c(x): Redirecting "http://xxx.xxx.xxx.com " (redirection depth=0)
"Action1.c(x): Error: Failed to connect to server..."

 

This happens because the redirection depth is set to zero.

 

Solution:

 

There are 2 ways to change this value; one is to change the config file or using a function in your script.

 

The first option is mentioned below:

 

1. Go to the \template\qtweb directory.


2. Edit default.cfg using a word editor.


3. Locate the [web] section.


4. Add the entry for MaxRedirectionDepth.


MaxRedirectionDepth=x; where x is the number of redirections desired.


Perform the above steps for the default.cfg in script folder also.


The second option is to use the web_set_option function as shown below:


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

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Labels (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.