Forum Discussion

cooldownthethro's avatar
cooldownthethro
Occasional Contributor
14 years ago

Passing value from one web page to another..

Dear All,
I am trying to record web session so that I can export this file to loadUI and generate loads.
While recording the web session i need to pass the viewStateID or SESSIONID from login page to user home page and subsequent pages visited by the user.

I am FACING BIG PROBLEM USING BOTH.

1st Way:-
1. passing session id from login to user home page.

When I fire a request the page opens in the SOAPUI browser but only certain times the header shows this filed:-
Set-Cookie SESSIONID=sgasghasgjasghkasghjasg

Problem:-

This field appears only certain time and not always.Absolutely no clue.
I cannot extract the value of Set-Cookie.I tried extract param method but it fails to give me any value.
In Set-Coookie i set type as HEADER.

I even tried using property transfer method but when i select login page the source type always remain the same and I dont know how can I extract the header value by using any of the options specified in the source type.


2nd Way:-

2. Getting viewstateID present in the response of user home page and pass it to each and every page visited subsequent to the user home page.

I tried using property transfer method from login page to user home page.
I selected source page as the login page and the source type is :- Response and ResponseAsXML

However in both the response I get <CDATA>, <DOCTYPE>(present in my code) and META tag(present in my code) inside the response which using xpath I cannot extract..I don't have any namespace defined hence when I write xpath in source to get the value of session ID, the value is always null....

I just specify the xpath expression below the source combo box.

Also it is surely not a good practice to remove the doctype and metadata tag from the web page just to ensure I can take a trace of the user web session.......

Can you please guide me how can I achieve the desired result.

I have been going through the documentation present on the website n number of times but I still don't know how can it be achieved...
No RepliesBe the first to reply