C++ STL – Vector

Posted on Posted in Programming Contests

Programming Contests require us to solve coding problems as FAST as possible.  To achieve speed we should have pre-coded data structures ready with us, so that we can save time by using them at the time of Contest.  In return we get more time to come up with algorithm, code the solution, test and debug the solution.  STL […]

Data Structure – Linked List

Posted on Posted in Programming Contests

What is importance of Linked List? This question is no different than asking ourselves – “If there are buses to transport people from one place to another, Why do we need trains?” I’m sure everyone has a convincing answer about importance of trains because we’ve grown up using buses and trains. While trains can carry […]

XPath and CSS Selectors

Posted on Posted in Selenium Java

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

Posted on Posted in Selenium Java

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

Posted on Posted in Selenium Java

What Are Alerts? Click buttons below to experience yourself. 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 OK […]

Selenium – Drop Down and Multi-Select

Posted on Posted in Selenium Java

What Are Selections? Single Selection Select CountryCanadaUSAUKSwedenIndiaOther Multi-Selection EnglishHindiFrenchPunjabiJapaneseSpanish 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 to find […]

Selenium – Alerts Handling

Posted on Posted in Selenium Java

What Are Alerts? Click buttons below to experience yourself. 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 a […]

Selenium – WebElement Commands

Posted on Posted in Selenium Java

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 […]