i
WebDriver Introduction
Selenium WebDriver Architecture
Introduction to WebDriver API
Introduction to WebDriver – Code
Handling Dropdowns and Select class
Handling Multiple Dropdown values and Links
Handling Radio buttons and Checkboxes
Capture Screenshots and Email test results
Browser Navigation Methods
Handling tabs
Capturing screenshot, Handling tabs and pop-ups – Code
Handling tabs and Pop-ups – Code
Handling Alerts
Handling User Authentication and Input alerts
HtmlUnitDriver and Handling Captchas
Handling Web Tables
Synchronization
Handling WebTables, Synchronization issues, Firefoxprofiles – Code
Actions Class
Event Listeners, Event Firing Mouse, Coordinates – Code
Handling Mouse Hover in Selenium
JavascriptExecutor
Handling Iframes
IsElementPresent, IsEnabled, IsSelected
Working with Chrome Driver - Part 1
Working with FireFox Driver - Part 2
Working with Internet Explorer Driver - Part 3
Handling SSL Certificate
Desired Capabilities
How to Encode password in WebDriver
Handling JQuery Elements - Drag and Drop, Sliders, Resizable
Handling JQuery Elements - Drag and Drop, Sliders, Resizable – Code
Working on IE Browser using Actions
TestNG, Ant & Report Generation through XSLT
Introduction to TestNG and Annotations
TestNG Parameterization
Configuring ANT, Generating TestNG & XSLT Reports
Code for generating XSLT / Surefire Reports through MAVEN
TestNG Parameterization Excel Reading
Handling Multiple data providers
TestNG XSLT Jar, Build.xml & TestNG.xml file
Frameworks Introduction
Hybrid (DATA + KEYWORD) driven Framework
Framework Architecture
Reading Excel sheets
TestNG DataProvider
Data Provider with Hashtable
Handling Multiple Test Suites
Multiple DataProviders
Setting up Run-modes at Suite Level
Setting up Runmodes at TestCase Level
Creating a common utility for Run-modes
Hybrid Framework Code
Sometimes we face a situation where organizations have their proxy settings to access the servers. If we open a server URL in a browser, it asks to provide the user credentials to continue the further operations. Users can not continue until it provides the credentials to the server.
We have different types of solutions available in selenium to handle this situation. Let us talk about the most used way to handle such a situation.
Passing the username and password in server URL:
This is the primary and most used technique to handle this situation where we pass the user credentials through the URL of the web page.
Syntax: http://username:password@domainName.com
Now we can pass this URL to the driver object to load the web page. Now the web page does not show the authentication pop-up.
Let us check the complete sample code to handle this situation.
Package SeleniumTest.SeleniumTest;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class WebDriverTest
{
public static void main( String[] args )
{
System.setProperty("webdriver.chrome.driver","C:\\Users\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("http://username:password@domainName.com");
}
}
Input Alerts:
We have discussed this topic earlier as well in “Handling Java script Alerts & Keyboard Events." Here user needs to pass some information required by an alert pop-up. We handled this situation by using the Alert interface. We need to first switch to the alert and then enter the user inputs using the sendKeys() method. Finally, we need to accept the alert to close the alert pop-up.
Alert alert=driver.switchTo().alert();
alert.sendKeys(“Happy Testing”).accept()
Don't miss out!