Posts

Showing posts with the label Selenium Webdriver

Find Broken Links on Webpage with Selenium Automation

Image
As an Automation Tester, you get to play with links present on the website. Links are one of the most important parts of the webpage. So, it's always important to not leave any broken links on any website. Testing the links manually could be a tough and time taking task. In this post, we'll learn to automate URL link testing. 1. What is a Broken Link? A broken link is a URL that is not working or not reachable. There are multiple reasons for its dis-functioning. There are different HTTP error status codes that the browser shows when the link is broken. These error codes have different meanings. Let's take a look at the different HTTP status codes. 200 - It means success, the link is working. 404 - It's the most common one, which means Page not found. 403 - Authorization is required to access the page.  400 - It has different meanings, bad request, bad host, timeout, etc. 500 - Internal server error. 2. Why a link broke? A link might not be working due to many reasons,

Learn Selenium Wait Commands: Implicit, Explicit and Fluent Waits

Image
1. Introduction to Selenium Wait Commands Selenium Wait Commands are an essential aspect of automated testing with Selenium WebDriver. They allow us to synchronize our test scripts with the application under test, ensuring that the desired elements are present and in the expected state before performing actions on them. Waiting for elements or conditions to be met is crucial for reliable and stable test execution. Table of Contents: Introduction to Selenium Wait Commands 1.1 Why are Wait Commands Important? 1.2 Types of Wait Commands in Selenium Implicit Wait 2.1 How Implicit Wait Works 2.2 Setting Implicit Wait in Selenium Explicit Wait 3.1 What is Explicit Wait? 3.2 Conditions for Explicit Wait 3.3 Using Expected Conditions in Explicit Wait 3.4 Examples of Explicit Wait Fluent Wait 4.1 What is Fluent Wait? 4.2 Customizing Fluent Wait Conditions 4.3 Examples of Fluent Wait Thread.sleep() vs. Selenium Wait Commands 5.1 Differences between Thread.sleep() and Selenium Wait Comma