Monday, July 13, 2015

C# Selenium webdriver - generic method for get child Xpath

Use following generic method for get child XPath

public static string FindChildXPath(string element)
        {
            string childXpath = "//[@id='" + element + "']/" + element[1] + "/";
            return childXpath;
        }

0 comments