Posts

Showing posts from 2016

Features of Automation

We can perform regression testing Save time by executing the test cases without manual effort. We can reduce the cost to the Company We can maintain accuracy by repeating the tasks in the same manner We can identify bugs We can report the bugs to the developer and the Manager We can ensure quality

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