Skip to content
This repository has been archived by the owner on May 27, 2018. It is now read-only.

exception throw when using jasmine-maven-plugin #4

Closed
hangstrap opened this issue Apr 19, 2012 · 1 comment
Closed

exception throw when using jasmine-maven-plugin #4

hangstrap opened this issue Apr 19, 2012 · 1 comment

Comments

@hangstrap
Copy link

I am trying to use the jasmine-maven-plugin with the jasmine-dom testing addon.

When I add the jasmine-dom-matchers.js feature, I have found that the plugin fails the build with the following error.

com.gargoylesoftware.htmlunit.ScriptException: Error: Can't determine selector engine...

As the test passes when using a standard browser, this error is due to some missing feature in the htmlUnit engine.

I have traced the exception to the following code

jasmine.DOM.queryAll= (function(){
  if ('undefined'!==typeof(Sizzle))
    return Sizzle;
  if ('undefined'!==typeof(Prototype))
    return function(selector, node)
    {
      return Element.getElementsBySelector(node||document, selector);
    };
  if ('undefined'!==typeof(jQuery))
    return function(selector, node)
    {
      var result= jQuery(selector, node);
      var nodes= [];
      var len= result.length;

      for (var i=0; i<len; ++i)
        nodes.push(result[i]);
      return nodes;
    };
  if (document.querySelectorAll)
    return function(selector, node)
    {
      if (!node)
        node= document;
      else if (node!==document)
        selector = ['#', jasmine.DOM.assignId(node), ' ', selector].join('');
      return jasmine.DOM.slice(node.querySelectorAll(selector));
    };

  throw new Error("Can't determine selector engine...");
})();

any ideas, workarounds?

Thanks

Richard

@DevinLindsey
Copy link

I am having this issue on IE11- any news?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants