WAYS TO FIND DYNAMIC XPATH FUNCTIONS IN SELENIUM WEBDRIVER
XPATH FUNCTIONS IN SELENIUM WEBDRIVER XPath: //button[starts-with(@id, 'continue')] XPath: //input[contains(@class, 'suggest')]. XPath : //input[@id='email']/parent::* XPath: //input[@id='email']/following::* XPath: //input[@id='email']/following::tr XPath: //select[@id='month']/following-sibling::* XPath: //select[@id='month']/following-sibling::select/ XPath: //input[@id='pass']/preceding::tr XPath: //select[@id='day']/preceding-sibling::select/ XPath://select[@id='day']/preceding-sibling::* //*[contains(@id,’your-common-pattern’)] Using CSS we can use as below: With ID - css=input#email or css=#email With Name - css=input[name=email] or css=[name=email] xpath : - //*[@id='email' or @name='email'] xpath: //input[@name='email'][@style='background-color: transparent;'] Some MoreExamples using Xpath Functions: I often use "contains...