turn off css javascript validation - getting invalid or illegal selector was specified selector: '[t^='']

1,018 views
Skip to first unread message

Robert Gallacher

unread,
Oct 29, 2013, 5:23:44 AM10/29/13
to subs...@googlegroups.com
I hope someone can help. I'm very new to substeps so please bear with me.

I'm getting the following message
"SEVERE: runtimeError: message=[An invalid or illegal selector was specified (selector: '[t^='']' error: Invalid selectors: [t^='']).]"

I'm presuming htmlunit its being very strict on checking jquery.  I've tried various versions of jquery to no avail(some posts on the web I'd seen worked with 1.10 and we are using 2.0.3).  If I put "htmlunit.disable.javascript=true" it will pass fine but I take it I really want to leave javascript on.  In fact I know I'll need it on as a later test relies on javascript.  

I've seen various posts on the web to ignore css/javascript validation possibly by setting the logging level.I've tried adding the log4j stuff from the sample substeps project provided but that doesnt seem to have worked.   How would I turn this off using substeps please?

many thanks
Rob

Ian Moore

unread,
Oct 29, 2013, 6:11:57 AM10/29/13
to subs...@googlegroups.com
Hi Rob,

I'm not too sure what to suggest there, googling for that issue indicates that others have found this problem although it's not entirely clear if it was fixed or not.

The logging settings simply hide the errors, but those errors alone shouldn't stop the tests from working - do the tests pass with javascript enabled or do they fail?  Are you using log4j for your logging - the logging config in the sample project should disable the HTMLUnit output ?

We have encountered some limitations of HTMLUnit and often use Chrome or Firefox for our tests, running them headless in our build environments.

Hope that helps a bit, feel free to come back with more questions or info...
cheers
Ian

Robert Gallacher

unread,
Oct 29, 2013, 8:09:46 AM10/29/13
to subs...@googlegroups.com
Hi Ian

Thanks,  Yes thats exactly right.  I'm just reading about the rhino engine and its limitations with javascript as well.  You've given us a good steer though with using chrome or firefox engine so I guess we'll go down that route and see if that works. I think the logging was a red herring so thanks for clearing that up as well.

Many thanks
Rob
Reply all
Reply to author
Forward
0 new messages