Forum Discussion

Satheesh-raju's avatar
Satheesh-raju
Occasional Contributor
7 months ago

Feasibility to check the page loaded in LoadNinja

Hi All,

I am working on a load testing script and need to add a validation to check if the user is navigated to a specific page during the test. Is it possible to achieve this using JavaScript validation?
Sample JavaScript function used

function _jsCheckPageNavigation() {

const expectedURL ='www.example.com/page1';

const urlToCheck = window.location.href;

if (expectedURL===urlToCheck){

return true;

} else {

return false;

}

return _jsCheckPageNavigation();

 

No RepliesBe the first to reply