I am trying to use a Javascript snippet to make sure two divs having some text co exist in another one [ Basically validate the existence of a comment on a certain post ]
The JS works on firebug but fails on selenium IDE.
javascript{
return ($.grep( $("#Posts li") .map(function(index,element){
if($(element).has(".puls_content:contains('post text')").length > 0){
if($(element).has("*:contains('this is a comment')").length > 0) {
return true
}
}
return false
}) , function(x){ return x}).length > 0) }
I get the Unexpected Exception error from selenium-api.js, any help ?