Highlight element in Internet Explorer (xPath)

Because missing proper xPath tool support in Internet Explorer, you have to Do It Yourself.
It feels dirty, but you get used to it 😉
1.) Open www.google.com in Internet Explorer & press F12 (to open developer tools)
2.) Open console-tab and execute following javascript:

var script = document.createElement("script");
script.src = "http://selenium.googlecode.com/git-history/f0245c5918a5ee98e25e47b3e08746eb7fd1a0ee/src/main/resources/core/xpath/javascript-xpath-0.1.11.js";
script.setAttribute("type","text/javascript");
document.body.appendChild(script);

If prompted, decide for „Show all content“ …
Internet-Explorer-xPath-warning
… than execute this javascript again. If you are prompted again, then execute the javascript again. Do this as long as the prompt appears.
Choose your xPath and execute:

var xPath= ".//*[@title='Google']";
var myElement = document.evaluate(xPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
myElement.style.outline="3px solid red";
myElement.style.border="3px solid red";
myElement.style.opacity=1;
myElement.style.visibility="visible";
myElement.style.zIndex="2147483647";
myElement.style.overflow="visible";

Et voila, your evaluation of Internet Explorer’s xPath:
Internet-Explorer-xPath-success
My frist reader, who can add the scroll-to-that-element feature wins a backlink 😉
Notes:

  1. If no element was found, the thrown exceptions may differ from time to time and are somehow cryptic. You have to get used to that.
  2. This hack was tested with Internet Explorer 9 & 11
  3. Find similar hacks: https://autumnator.wordpress.com/2013/05/02/testing-xpath-and-css-locators-firepath-style-across-browsers/
  4. Supports working in test-automation, e.g. with Selenium

Deutschsprachiger Testing-Blog

Ein neues Softwaretest Portal in der deutschsprachigen Testing-Landscape ist erschienen: Testing-Board.com
Neben den Themen Softwaretest, Testautomatisierung, Testdatenmanagement, Crowdtesting, Agile Testing und Last- und Performancetest bietet der Blog auch ausführliche Listen mit Testautomatisierung Tools und Testdatenmanagement Tools. Im Bereich der Testautomatisierung werden zusätzlich externe Selenium Tutorials gelistet.
A new German-speaking software testing portal has grown: Testing-Board.com
The Web Blog offers content about Software Testing, Test Automation, Test Daten Management, Crowdtesting, Agile Testing and Load Testing / Performance Testing and furthermore content including full and detailed lists of Test Automation Tools and Test Data Managment Tools. In the field of Test Automation are also external Selenium Tutorials listed.

Performance test of integrated FirePath

I did a basic performance test for my favorite test-automation workflow with an integrated FirePath. I distinguished two phases: duration to start the Firefox Browser and duration for executing a very typical testprogram against a common website. And here are my results:
performanceTest FirePath
The starting of a WebDriver-driven Firefox with an integrated FirePath costs in average about 20 seconds more than the starting of a „naked“ Firefox. In contrast the execution of the typical testprogram doesn’t show a significant difference in velocity. The few seconds difference are maybe caused by performance differences by the webserver of the tested website, anyhow not significant …
To say it very clear: 20 seconds more in the starting phase is nothing compared to the time we spend to navigate a different Firefox (not the driven Firefox) until we finally reach the point of disturbance and finally start to debug the xPath there. So enhance your test-automation workflow with an integrated FirePath!

Anpacken!