Jump to content


Photo

What version of Javascript does WAPT use?


  • Please log in to reply
3 replies to this topic

#1 Chrondeath

Chrondeath

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 17 April 2014 - 05:18 PM

I have a test scenario where I need to locate parameters to pass in the next request based on some context in the response that I don't think I can handle with the Search function type (there is dynamic text between the string I need to extract and the string I need to recognize).

 

A Javascript function looked like the best solution to extract the response data that I need, but I'm having trouble figuring out what Javascript features are available for me to use.

 

I tried to import JQuery and Sizzle, and both of them cause an error every time I hit "Test" for my Javascript function, as best I can figure because there is no "window" attribute?

 

It doesn't look like I have access to document.querySelector.

 

I tried to find the version of Javascript using navigator.userAgent, but "navigator" is also undefined.

 

What version of Javascript is being used by WAPT for executing these Javascript functions?  Is there anything like querySelector or JQuery available, or am I going to have to parse the document manually?



#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 18 April 2014 - 09:32 AM

WAPT uses Windows Scripting Host to execute JavaScript. I think querySelector should be available if you use IE8.


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 Chrondeath

Chrondeath

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 18 April 2014 - 04:41 PM

I have IE 10 installed, and both of these functions return "undefined":

 

function testQuerySelector()
{
    return typeof context.document.querySelector;
}

function testQuerySelectorAll()
{
    return typeof context.document.querySelectorAll;
}
 

Is there something I'm doing wrong to get to these functions?

 

I'm on WAPT Pro 2.5, if it matters.



#4 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 21 April 2014 - 05:58 AM

I've checked and unfortunately querySelector is not supported.

But you can try to use getElementById if it is suitable for you.


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