Friday, June 19, 2009

Jmeter variable from Javascript

http://markmail.org/message/ulcmpdtuz7rumotp
http://www.mediacollege.com/internet/javascript/number/random.html
1. Create "User Defined Variables"

Variable SCRIPT:
var randomstring = ''; var chars = "abcdefghiklmnopqrstuvwxyz";for (var i=0; i
Originally from:



There is no need to escape the commas in the SCRIPT variable, because the above statement is parsed before the the variable is replaced by
its contents.



2. Use Variable in JMeter Sampler:
${__javascript(${SCRIPT})}

scroll to the top of the page after user change the page in the gridview



Sys.WebForms.PageRequestManager endRequest Event

Raised after an asynchronous postback is finished and control has been returned to the browser.
Syntax

Sys.WebForms.PageRequestManager.instance.add_endRequest(endRequestHandler)
Sys.WebForms.PageRequestManager.instance.remove_endRequest(endRequestHandler)

endRequestHandler: The name of the handler method that will be called.

The endRequest event is raised after an asynchronous postback is finished and control has been returned to the browser. You can use this event to provide a notification to users or to log errors.

http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerEndRequestEvent.aspx