Is there a way for js code to force Selenium testing to fail? For (a probably bad) example, if I had the following:
return document.getElementById('foo').innerHTML == 'hello'
is there a way I could make the 'runScript' command fail depending on if the js code returned true or false? (I know that example could be used by other Selenium commands, but I wanted a more general solution.)
Do I need to learn how to extend Selenium to add another command?
I'm also relatively new to Selenium so is this something that using Selenium-rc will solve?