Let’s run some automated selenium tests in Firefox, without Firefox! 😉 In other words, tests run in the background and there is no display (i.e. the browser UI is not displayed to the user).
Continue readingPosts in "Selenium"
9ac. WebDriver – Unable to locate an element easily? Read on…
The easy and best way to handle scenarios where there are no proper locators, is to introduce data-* attributes (custom data attributes) on HTML elements.
Continue reading10l. Advanced WebDriver – Using Log4j Part 2
This is a continuation of the article, ‘Using Log4j Part 1’ and hence, I suggest that you read part 1 before proceeding any further to get a grip on what’s happening. Scenario Configure Log4j.properties file, Log level – DEBUG Loggers – rootLogger and SeleniumTestLogger Appender – RollingFileAppender Layout – PatternLayout Write a JUnit4 test case, ‘Log4jTest.java’,… Continue reading
10k. Advanced WebDriver – Using Log4j Part 1
Let me take a stab at explaining logging for Selenium with Apache Log4j today! So, without further ado, let’s dive in!! Why do we need logging in the first place? As an automation tester, we deal with troubleshooting, debugging and so on. Logging makes this entire process so much easier! It gives us these magical… Continue reading
9ab. WebDriver – Using Actions Class
Lights, camera, action! Yes, today its all about Actions. Oh, I am not talking about those fight sequences you watch in movies but about the keyboard and mouse actions. 😛 Selenium WebDriver provides a user-facing API for performing complex user gestures. We want automation everywhere! So, instead of using keyboard and mouse directly, we can… Continue reading
9r. WebDriver – Assert and Verify
Hiya superstars! We have been locating elements for quite some days now. Let us switch gears and talk about “Assert and Verify” today. To remember, The major difference between the two when the assert or verify condition/check fails is, Assert will fail the test and abort the execution of the current test case. All other test steps after… Continue reading
9aa. WebDriver – Executing JavaScript code
Hiya Champs! Let’s have some quality interaction with the browser today!! So, can you guess the language that is preferred by the browser? Yes, you got that right. It is JavaScript indeed. If you are using Chrome, clicking on ‘F12’ will open the ‘Developer Tools’ which helps us to execute JavaScript directly from the browser…. Continue reading
10j. Advanced WebDriver – Reading data from excel using POI
Hiya friends! Today, let us delve into excel sheets and understand how to read data from them. As part of automation and building an automation framework, we tend to store data in excel sheets in a predefined format (usually following a template). The data we store is mostly test data, different test URLs, release specific… Continue reading
10i. Advanced WebDriver – Using property files
Hiya champions! Welcome back to another fun filled article which tells you why property files exist in the first place!! This particular concept is not just limited to Selenium WebDriver projects. It can be used in basically any Java project that involves hardcoded stuff. Imagine you have more than a couple hundred automated test cases and… Continue reading
10h. Advanced WebDriver – Sending email with attachments
Hiya champs! Now that we have our JUnit report in PDF format let us attach it with an email and send it across to various project stakeholders. So, today we are mostly going to work with just Java. Grab a cup of coffee (Java) you all! We will be looking at two classes. SendMail.java – This… Continue reading