Contributions
Re: JavaScript Validation not working
Thanks for your reply! Looks like its just something with how this page is coded. I used my JavaScript on another site and it worked fine. I am not able to post the URL since it has credentials embedded in it. I am just going to have the test alert if it sees certain error messages for validation. Thanks again.7 years agoPlace AlertSite QuestionsAlertSite Questions1.8KViews0likes0CommentsJavaScript Validation not working
I have a simple DejaClick script that hits a web page and then tries to validate there is certain text on the page. When I record the test in DejaClick and use the Keyword Validation tool it finds certain text no problem. But when I replay the script, it fails the validation. I thought I would try to use JavaScript Validation instead. I created a one line JavaScript looking for document.title that returns 'true' when I use the developer tools in Google Chrome, but when I try to use this in DejaClick, it does not appear to return 'true'. Not too familiar with JavaScritpt, so is there something different I need to do in DejaClick to get the script to return 'true'? I am trying to alert on 'true' for testing it out and will then switch to 'false' when it works. Doesn't alert on 'false' either as an FYI. Here is the code: var square = function() { if (document.title == "Home"){ return true; } }; square(); Any assistance would be greatly appreciated.7 years agoPlace AlertSite QuestionsAlertSite Questions1.8KViews0likes2Comments