JavaScript 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.