Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
411 views

Http status code 403 - Help please

Hi,

In vugen i have recorded a script of my application, when i replay my script in vugen it gives an error "http status code 403". Screen shot is attached, kindly have a look. I have tried different ways menthioned on community cases but no luck. kindly suggest something more appropriate.

Vugen version is 12.60.

IE version is 11.0

Chrome version is 73.0

Firefox version is 66.0

Best Regards

0 Likes
19 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

Hi Mike, 

it may be an authentication problem. Have you tried to insert, at the top of the code, some web_set_certificate_ex() (you have to attach some certificate file by right click on "Extra Files"), web_add_cookie() or web_set_user() functions?

Let me know, 

Lorenzo

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Http status code 403 - Help please

Hi lb1,

Thank you for your response.

No, i have not added anything manually yet. How i can add these files?

Regards

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

Hi Mark, 

we can try by insert these functions before the web_custom_request() function, they will be the first functions inside the Action() section. 

- web_set_user() allow you to define username and password to access in authentication modality to a web resources, exposed for example by your web service;

- web_set_certificate_ex() is useful to attach some ISP or similar documents to your script: you have to do a right click under "Extra Files" (left part, VuGen's Solution Explorer) and choose "Add Files to script", then you can insert the function on your bytecode specifying the name of the certificate;

- web_add_cookie() permits you to add a particular cookie code to be used as key session for your request. You have to specify the cookie type and its code as arguments. 

Try to use one of these functions. For their formalism see the official documentation (online or by clicking F1 on you VuGen display). 

Hope this can help you, 

Lorenzo

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

In add to my latest response, if you have record your script as a web navigation, you could see if there are some correlations keys under "Design Studio": it may be some key session for authentication (such as cookie or XSRF token) that will be parametrized/correlated by web_reg_save_param(). 

I hope you can solve the quirk!

Lorenzo

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Http status code 403 - Help please

Hi lb1,

Thank you so much for your help.

let me perform these steps. i'll let you know the responses.

Regards

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Http status code 403 - Help please

Hi lb1,

I have performed all these suggestions, but no luck. Still getting the same error. kindly help.

Regards

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

Sorry Mike, 

your script is a single web service request or a web navigation with more web_custom_request() functions?

Lorenzo

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Http status code 403 - Help please

Hi lb1,

There is only one web_custom_request () function .

first step is login. then i am submitting a query, then logging out.

Error is occuring in query transaction in POST method.

Regards 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

Hi Mark, 

have you checked that all previous requests are right? You should check that all web_custom_request() or web_url() before the query function are right by comparing their content by "Snapshot" layout: match Recording and Replay windows, and see if there is any Path that is not present in Replay part (pay attention on Size value for each Path row).

compare.PNG

Are you sure that there's no more useful correlation with "Design Studio"?

Maybe there're some necessary authentication/credential values ​​to do your query operation ...

Lorenzo

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Http status code 403 - Help please

Hi Lorenzo,

Thank you so much. I really appreciate your support.

By comparing their content by "Snapshot" layout: match Recording and Replay windows, and see if there is any Path that is not present in Replay part (pay attention on Size value for each Path row).

What if they are not matching (Recording and Replay windows)?

Are you sure that there's no more useful correlation with "Design Studio"?

Yes, all the correlations are applied.

Maybe there're some necessary authentication/credential values ​​to do your query operation.

Yes, it is submitting my query back to server. Yes, there is some authentication error i am not able to find where, and how to solve it.

attaching my script  so you take a closer look.

Regards

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Http status code 403 - Help please

Hi Mike, 

I've see your script but due our web policies, I can't execute it. Can you mark me what's the name of the query function?

Matching with "Snapshot" layout allow you to isolate the issue: if there's no matching with Replay and Recording windows, maybe there were some perverse components or problems in recording phase.  In this case, may be necessary add some manual correlation (with web_reg_save_param() function) of keys session those are not catched by "Design Studio". 

In your script I don't see particular dynamic keys such as smagentname or date types, so I don't know what can be the hub of the problem. One thing: do you know the "dc" argument? I see it in more function on the script, and its value is always different (attached below a simple sketch about it); maybe can we try to correlate it? Obsviously, make a copy of the script before modify the bytecode!

dc_param.png

Let me know, 

Lorenzo

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.