getElementByXpath returns first visible element, not last.

Style fixes.
Merge pull request #581 from OniOni/test-updates

getElementByXpath now returns the first visible element, not the last.