Level3

CSS Selector

CSS Selector

Level3, Selenium
Locating elements by CSS Selectors There is a debate on the performance between CSS Locator and XPath locator and the debate on the performance of CSS and XPath locator is out of scope of this post. Most of the automation testers believe that using CSS selectors makes the execution of script faster compared to XPath locator. This locator is always the best way to locate elements on the page. Following are the some of the mainly used formats of CSS Selectors. Tag and ID Tag and Class Tag and Attribute Tag, Class and Attribute Sub-String Matches Starts With (^) Ends With ($) Contains (*) Child Elements Direct Child Sub-child nth child Matching By inner Text Tag and ID: Syntax: css=tag#id Open Mozilla Firefox and navigate to 
Waits in Selenium | ImplicitWait | ExplicitWait | FluentWait | Sleep

Waits in Selenium | ImplicitWait | ExplicitWait | FluentWait | Sleep

Level3
Waits in selenium : In UI automation, waits are required because few elements get loaded on the page asynchronously,  so after triggering an event a page may get loaded successfully but some of its element may still not get loaded. Sometime Due to network issue an webpage elements load after sometime or with a delay. There is 3 different way to handle this using waits in Selenium: Implicit Waits Explicit Waits Fluent waits   Implicit Waits Implicit wait is set for the entire duration of your webdriver and is set at the start of your program. What it does is, in case while executing, if your webdriver doesn't finds any element then instead of throwing an exception, implicit wait makes your driver to wait for the specified wait time and then try to find the el
TestNG in Selenium

TestNG in Selenium

Level3, Popular, Selenium
TestNG Annotations : Annotations are nothing but a piece of instruction for the compiler that you apply to classes, methods or variables in your Java code. It is a powerful feature and an integral part of the TestNG framework.  The TestNG annotations extend the same concept and control the execution sequence of the test code and test methods   List of Annotations in TestNG: TestNG Annotations Description @Test Attaches a class or a method to become the part of the test. @BeforeTest Instructs the method to run before any test method related to the classes which are inside the <test> tag as per the testng.xml file @AfterTest Halts a method from execution till all the test methods finish their execution. These methods belong to the classes defined