Apr 20, 2013 · Best approach to find nested elements with WebDriver :When Xpath becomes your best friend Posted on April 20, 2013 by Michael Hidalgo Most of the time, browser automation using WebDriver is all about finding html elements: find a button and click it to perform any action, find an user input text box and set a specific text, find a link and ...

4.3. Locating by XPath¶. XPath is the language used for locating nodes in an XML document. As HTML can be an implementation of XML (XHTML), Selenium users can leverage this powerful language to target elements in their web applications. Nested if statements are basically used whenever we want to check a condition based on the result of another condition. Let us look into below example with nested if using selenium : @Test public void testNestedIfExample() { System.out.println("Launching Firefox browser..");