Child pages
  • Setting Up Selenium for Web Client UI Testing

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Install the Selenium IDE plugin for Firefox from http://seleniumhq.org/download/ .
  • Create a folder "wicketPathLocatorBuilder" in your local drive with the file "user-extension.js.wicketPathLocatorBuilder" inside. Paste the following snipped in this file.
    Code Block
    LocatorBuilders.add('wicketpath', function(e) {
      var path = '';
       this.log.debug("wicketpath: e=" + e);
       var current = e;
      while (current != null) {
        if (ecurrent.attributesparentNode && e.hasAttribute("wicketpath")!= null) {
          path = this.relativeXPathFromParent(current) + path;
          if  this.log.info("found attribute " + e(1 == current.parentNode.nodeType && // ELEMENT_NODE
              current.parentNode.getAttribute("wicketpath"));    {
            return this.preciseXPath("//" + this.xpathHtmlElement(ecurrent.parentNode.nodeName.toLowerCase()) +
       
                "[@wicketpath=" + this.attributeValue(ecurrent.parentNode.getAttribute("'wicketpath"')) + "]" +
                path, e);
          }
        } else {
          return null;
        }
        current = current.parentNode;
      }
      return null;
        });
    
    LocatorBuilders.order.unshift(LocatorBuilders.order.pop());
  • Open the Selenium IDE, go to menu Options -> Options. In the Selenium Core extensions input field, paste the path to the earlier created folder "wicketPathLocatorBuilder".
  •  Restart firefox.

...