Jump to content


Photo

Wanting to cut and paste data from a page being recorded


  • Please log in to reply
4 replies to this topic

#1 mjones

mjones

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 09 April 2015 - 12:36 AM

I'm attempting to cut and paste a variable value from a web page that changes between executions.  After recording, the value that is recorded is listed as static text.  E.g. I cut and paste a value that is 100 during the recording of the script into a search box on the web page.  During run time the value may be 50.  I want to put the value of 50 (or whatever it is at run time) into the search box.  However, each run of the test puts the value of 100 into the search box.

 

How can I make that data that I cut and paste change with each execution of the script?

 

Thanks



#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 09 April 2015 - 07:58 AM

Initially when you record a profile for virtual user, all parameters are recorded as static values. However you can change that and make them dynamic. For this purpose you can use internal WAPT functions. With help of them you can accomplish two tasks:

 

1. Make values of some parameters different for each user session.

2. Extract values from server response (within a user session) and reuse these values in the subsequent requests.

 

You can find more information about that here:

 

http://www.loadtestingtool.com/help/working-with-session-variables.shtml

http://www.loadtestingtool.com/help/parameter-value-dynamic-calculation.shtml

 

We also have a demo clip showing step by step how to perform the parameterization. You can download it here:

 

Part 1: http://www.loadtestingtool.com/quickstart/WAPTdemo-part1.avi

Part 2: http://www.loadtestingtool.com/quickstart/WAPTdemo-part2.avi


Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#3 mjones

mjones

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 10 April 2015 - 12:32 PM

Thanks!

I appreciate the help and was able to solve my problem.

 

Thanks again



#4 mjones

mjones

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 10 April 2015 - 02:45 PM

Follow on question.

I have recorded a test that grabs a value from a URL as a variable that I use to replace a URL parameter on a subsequent page,   When I run it as a short test and only taking it to the point of replacing the value it works.  However, when I use this as part of a larger test I receive a message that the URL is too large.  The variable does the following search: $Search(?docId=,&re,1) which I then include on the page where I need to use that value; calling it as an autosearch variable.

 

Thanks



#5 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 13 April 2015 - 07:40 AM

It means that there is something wrong in your parameterization. You can enable logs and check server responses.


Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users