getXPath() method to generate XPath expression for any node in the UI tree