Maven

  Motivation Problem There are two issues that you would have faced till now in doing Selenium Development In Parallel Development, managing the dependency on Selenium JARs is a pain.  Either we’ve to commit them into GITHUB or need to share them in a standard path. For every new selenium project in Eclipse, Download and…

Selenium – Switching Frames

Let’s take a different approach this time to learn switching commands.  We’ll begin with a small exercise Create a new Java Class in Eclipse Create WebDriver object Go to following page JQueryUI – AutoComplete Inside tags textbox show on the page, try to type in text ‘Test’ Once you’ve written the code and ran it.…

Selenium – Switching Windows

Why Learn Switching Windows using Selenium? You may come across certain automation scenarios that involve any of the following  An action on website causes a new browser tab to be launched.  Website shows some popups which may require some action.  An action on website causes new browser window to be launched. And sometimes we ourselves…

XPath and CSS Selectors

Why Should We Learn XPath and CSS Selectors? To automate our test cases we need to locate elements on a web page (Textbox, RadioButtons, Checkboxes, Dropdowns etc) and then perform actions based on test steps. So far we’ve learnt 6 out of 8 ways to locate Web Elements on a page By.id(“elementId”) By.name(“elementName”) By.linkText(“HyperLink Text”)…

TestNG

Why Should One Use TestNG? So far, we’ve written our tests using following approach Create a Java Project Add a Class Write main function (public static void main) that contains Test Automation code. Imagine, we’ve 50 test cases automated using this approach.  Answer these questions: How do we run our test suite of 50 test…

Selenium – Drag and Drop

What Are Alerts? Click buttons below to experience yourself. %CODE1% Drag me to my target Drop here Now, Imagine we are testing a website that shows you alerts on taking some action.  We need a way to programmatically take some action on Alert.  Now what are possible actions we may want to perform on an alert? Click…

Selenium – Drop Down and Multi-Select

What Are Selections? Single Selection Select CountryCanadaUSAUKSwedenIndiaOther Multi-Selection EnglishHindiFrenchPunjabiJapaneseSpanish %CODE1% Getting Ready to handle Select (DropDown and Multi-Select) We can’t deal with select using WebElement commands because Select support many options to interact than provided by WebElement.  To handle selections, selenium has defined a separate class named Select. Whenever in our web application, an select element is encountered we request WebDriver…

Selenium – Alerts Handling

What Are Alerts? Click buttons below to experience yourself. %CODE1% Message Alert Confirm Alert Prompt Alert Now, Imagine we are testing a website that shows you alerts on taking some action.  We need a way to programmatically take some action on Alert.  Now what are possible actions we may want to perform on an alert? Click OK on…

Selenium – WebElement Commands

Understanding WebElement Commands After the website opens up there are things that we do with various visible elements on the web page – TextBox, Password Fields, Menus, RadioButtons, CheckBoxes, Dropdowns etc. Every single controls present on the page is called a WebElement.  Each of WebElement is represented in selenium by WebElement interface. In this tutorial we are going to focus on…