Contributions
Re: Unable to recognize a button in LoadNinja
Hi Mary, I am Marcin from the LoadNinja support team. Please create a support case in our system using the following web form: https://support.smartbear.com/loadninja/message/ In the description, please include sample project and scrip names demonstrating the problem. I will have a closer look into it. Best regards,11 months agoPlace LoadNinja QuestionsLoadNinja Questions6.8KViews0likes1CommentRe: Ability to generate random values at runtime and pass it in as a parameter
Hi pranoti, Thank you for submitting a feature request. In LoadNinja, it is possible to generate some values at runtime and append them, for example, to a string using JavaScript validations. We can, for example, use a JS validation to access an input field on a page, and fill it with a string generated at runtime. See sample JS validation code below: function _InputValue() { var element = document.getElementById("testInputId"); const months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"]; const code = "PRG"; var dateNow = new Date(); var year = dateNow.getFullYear(); var month = months[dateNow.getMonth()]; var day = dateNow.getDate(); var hours = dateNow.getHours(); var minutes = dateNow.getMinutes(); var seconds = dateNow.getSeconds(); var miliseconds = dateNow.getMilliseconds(); var textFieldValue = code + year + month + day + hours + minutes + seconds + miliseconds; if (element){ element.value = ""; element.value = textFieldValue; return true; } return false; } // DO NOT CHANGE BEYOND THIS POINT - return _InputValue(); This sample code is creating a unique string starting with "PRG" and contains a date generated at runtime. See also: Documentation - JavaScript validations for more information. Best regards, Marcin, Customer Care Engineer826Views0likes0Comments