Guest Karthik Report post Posted March 13, 2008 Hi We are currently evaluating the WAPT tool for testing our web-based J2EE application developed using JSF framework in CELGENE, USA. We are seriously considering buying the product. However, I have one very important technical issue. I am having issues with creating variables from hidden values in the previous page. Currently, I have the following pages recorded in my WAPT profile: page_1: http:// <server>:7001/s100.faces page_2: http:// <server>:7001/s100.faces page_3: http://<server>:7001/s301.faces page_4: http:// <server>:7001/s302.faces page_5: http:// <server>:7001/s303.faces page_6: http:// <server>:7001/s114.faces page_3 is the registration form that posts data to page_4 above. Hence, I am creating a few variables in page_4 using the $Hidden function to get the values submitted from page_3. The screenshot of page_4 in WAPT is attached. I am trying to re-use these variables in page_6 for submitting further information in the test case. The screenshot of page_6 in WAPT is also attached. However, the log shows these variables going as blank for the POST request to page_6 though I have entered values in the screenshot for page_4. Here is the excerpt of the URL POST request to page_6 from the WAPT log: <% 12:11:45 Request %> POST /s114.faces HTTP/1.1 Cookie: JSESSIONID=LwNZHZSD01MFBQndGQGmPL0MtNmpLB9MypfNwtSWtnp03SVC2nGS!-1747703710 Content-Type: application/x-www-form-urlencoded Content-Length: 774 Host: <server>:7001 Referer: http://<server>/s303.faces Connection: Keep-Alive Accept: text/html, */* Accept-Language: en-us, * Accept-Encoding: compress, gzip, * Pragma: no-cache User-Agent: *WAPT 5.0* form_main%3Ainp_midInit=M&form_main%3Amenu_degree=100162&form_main%3Amenu_speciality=1&form_main%3Ainp_ssn=&form_main%3Ainp_dea=&form_main%3Ainp_meNo=&form_main%3Ainp_add1Name=Celgene&form_main%3Ainp_add1Att=&form_main%3Ainp_add1line1=&form_main%3Ainp_add1city=&form_main%3Amenu_add1state=&form_main%3Ainp_add1zipcd=&form_main%3Ainp_add1phone=0000000000&form_main%3Ainp_add1fax=0000000000&form_main%3Ainp_add1email=&form_main%3Ainp_add2Name=&form_main%3Ainp_add2Att=&form_main%3Ainp_add2line1=&form_main%3Ainp_add2city=&form_main%3Amenu_add2state=none&form_main%3Ainp_add2zipcd=&form_main%3Ainp_add2phone=&form_main%3Ainp_add2fax=&form_main%3Ainp_add2email=&com.sun.faces.VIEW=_id1197%3A_id1411&form_main=form_main&form_main%3Abtn_continue.x=71&form_main%3Abtn_continue.y=23 Am I doing something wrong? Could anyone explain how variables are supposed to be used? Where are the variables created in the URL chain for the test case? Thanks a lot!! Regards Karthik Quote Share this post Link to post Share on other sites
Guest angela Report post Posted March 14, 2008 Hi Karthik, It seems that you added variables not to the right requests. In your example the variables created in 4th request work with data from the response to this request, while, as we understood, you need to create a variable with data from the 3rd request. So please send to us your profile, scenario, logs, and detailed description of how the variables should be created (where the data should be obtained and in what variables it needs to be saved). Quote Share this post Link to post Share on other sites
Guest Karthik Report post Posted March 14, 2008 Hi I made the changes suggested by you and it works fine now. I have posted another issue with HTTPSession in this forum for which I am waiting for the reply. Thanks a lot!! Regards Karthik Quote Share this post Link to post Share on other sites
Guest Karthik Report post Posted March 14, 2008 Hi I just checked that it is not working again. I have a general question. I have a scenario where the following steps are done: 1. User enters login id and password from login page and posts to welcome page. I created variables 'varUserName' and 'varPassword' in WAPT to store the values from the user name and password fields (for use later) in this page using the '$Hidden' function. 2. User then clicks on a link on the welcome page and goes to register a new subscriber. After entering the details of the new subscriber, he digitally signs the page using his 'user name' and 'password' (essentially enters his user id and password with which he logged in Step 1 for adding the new subscriber). I substitute the 'user name' and password in this request with $varUserName and $varPassword WAPT variables that I stored in Step 1. However the variables '$varUserName' and '$varPassword' come as blank while POSTING this URL!! I am not sure if I am doing something wrong. Could you please help me with this issue? Thanks and Regards Karthik Quote Share this post Link to post Share on other sites
Guest angela Report post Posted March 17, 2008 Hi I just checked that it is not working again. I have a general question. I have a scenario where the following steps are done: 1. User enters login id and password from login page and posts to welcome page. I created variables 'varUserName' and 'varPassword' in WAPT to store the values from the user name and password fields (for use later) in this page using the '$Hidden' function. 2. User then clicks on a link on the welcome page and goes to register a new subscriber. After entering the details of the new subscriber, he digitally signs the page using his 'user name' and 'password' (essentially enters his user id and password with which he logged in Step 1 for adding the new subscriber). I substitute the 'user name' and password in this request with $varUserName and $varPassword WAPT variables that I stored in Step 1. However the variables '$varUserName' and '$varPassword' come as blank while POSTING this URL!! I am not sure if I am doing something wrong. Could you please help me with this issue? Thanks and Regards Karthik Hello Karthik, Please make sure that login and password are still kept in the $Hidden variables of the form, it seems that they are not. Also, is it necessary to use the $Hidden in the subsequent requests, i.e. why not to use the login\password values as in the 1st request, explicitly? Using $Hidden makes your test scenario more complex. Quote Share this post Link to post Share on other sites