The document provides an introduction to Selenium WebDriver. It discusses the architecture and components of Selenium 1.0 and 2.0. It describes the Selenium WebDriver API for finding elements, performing actions, and handling windows/frames. It also provides an example of creating a test in Java to validate search results on the Rambler website using Selenium WebDriver.
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...Simplilearn
In this Selenium tutorial, we will be learning about Selenium, its advent, components, advantages and limitations and lastly, its job roles and salaries. Selenium is an automated testing tool that tests web applications across various platforms and browsers. Selenium is a powerful automation tool and comprises of a suite of components viz. Selenium IDE, RC, WebDriver and Grid. The video has brushed upon the topics in brief and explains the following concepts:
⦁ Manual testing and its challenges
⦁ Advent of Selenium
⦁ What is Selenium?
⦁ Selenium suite of tools
⦁ Advantages of Selenium testing
⦁ Limitations of Selenium testing
⦁ Selenium jobs and salary
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course contains a lot of real-life examples and situations to demonstrate how to use Selenium WebDriver effectively. The training starts with a refresher course on core Java concepts and covers the basics of Test Automation and its importance in the industry. The course includes basic as well as advanced concepts of WebDriver and other tools/frameworks like TestNG, Maven, AutoIT, Sikuli, log4j. Special focus is given on building a robust framework with Page Object Design Pattern, Data-Driven Approach, and creating reusable components to improve productivity.
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
12. Execute a project from scratch by building automation framework and automating a few test scenarios
Who should take this Selenium training course?
The course is ideal for :
1. Test Managers
2. Test Engineers
3. Test Lead
4. Test Analyst
5. QA Engineers
6. Software Developers
7. Engineers who want to learn Automation testing
Learn more at https://www.simplilearn.com/selenium-certification-training?utm_campaign=What-Is-Selenium-PXeBv-AGa6o
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...Simplilearn
In this Selenium tutorial, we will be learning about Selenium, its advent, components, advantages and limitations and lastly, its job roles and salaries. Selenium is an automated testing tool that tests web applications across various platforms and browsers. Selenium is a powerful automation tool and comprises of a suite of components viz. Selenium IDE, RC, WebDriver and Grid. The video has brushed upon the topics in brief and explains the following concepts:
⦁ Manual testing and its challenges
⦁ Advent of Selenium
⦁ What is Selenium?
⦁ Selenium suite of tools
⦁ Advantages of Selenium testing
⦁ Limitations of Selenium testing
⦁ Selenium jobs and salary
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course contains a lot of real-life examples and situations to demonstrate how to use Selenium WebDriver effectively. The training starts with a refresher course on core Java concepts and covers the basics of Test Automation and its importance in the industry. The course includes basic as well as advanced concepts of WebDriver and other tools/frameworks like TestNG, Maven, AutoIT, Sikuli, log4j. Special focus is given on building a robust framework with Page Object Design Pattern, Data-Driven Approach, and creating reusable components to improve productivity.
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
12. Execute a project from scratch by building automation framework and automating a few test scenarios
Who should take this Selenium training course?
The course is ideal for :
1. Test Managers
2. Test Engineers
3. Test Lead
4. Test Analyst
5. QA Engineers
6. Software Developers
7. Engineers who want to learn Automation testing
Learn more at https://www.simplilearn.com/selenium-certification-training?utm_campaign=What-Is-Selenium-PXeBv-AGa6o
In this Selenium presentation, we will learn about Selenium and a have a hands-on demo on the working of Selenium IDE and WebDriver. Selenium is an automated testing tool that tests web applications across various platforms and browsers. Selenium IDE, RC, WebDriver, and Grid constitute the Selenium suite. The tutorial video touches upon all the topics related to these components.
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course contains a lot of real-life examples and situations to demonstrate how to use Selenium WebDriver effectively.
The following are the key concepts of Selenium included in the presentation:
1. Manual testing and its limitations
2. What is Selenium
3. Selenium suite of tools
⦁ Selenium IDE with demo
⦁ Selenium RC
⦁ Selenium WebDriver with demo
⦁ Selenium Grid
4. Advantages of Selenium testing
5.Limitations of Selenium testing
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data-Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
12. Execute a project from scratch by building automation framework and automating a few test scenarios
Who should take this Selenium training course?
The course is ideal for :
1. Test Managers
2. Test Engineers
3. Test Lead
4. Test Analyst
5. QA Engineers
6. Software Developers
7. Engineers who want to learn Automation testing
Learn more about https://www.simplilearn.com/selenium-certification-training?utm_campaign=Selenium-Tutorial-For-Beginners-cobEbkTwbwY
This presentation about Selenium WebDriver will help you understand what is Selenium, why Selenium WebDriver was developed, what exactly is Selenium WebDriver, the architecture of Selenium WebDriver and the limitations of Selenium WebDriver. In the end, we'll be looking at a demo showing the working of WebDriver using java. Selenium is an automated testing tool that tests web applications across various platforms and browsers. WebDriver happens to be one of the Selenium tools with a simple yet robust architecture. It controls the browser based on the user program. WebDriver revolutionized automation testing and continues to do so. Let's move further and understand the selenium web driver in detail.
Below are the topics we will be discussing in the presentation:
1. What is Selenium?
2. Why Selenium WebDriver?
3. What is Selenium WebDriver?
4. The architecture of Selenium WebDriver
5. Limitations of Selenium WebDriver
6. Demo: Automation testing with WebDriver
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course includes basic as well as advanced concepts of WebDriver and other tools/frameworks like TestNG, Maven, AutoIT, Sikuli, log4j. Special focus is given on building a robust framework with Page Object Design Pattern, Data-Driven Approach, and creating reusable components to improve productivity. The course also covers the Selenium Grid, which along with TestNG helps achieve parallel execution to improve coverage and reduce execution time for faster feedback. Appium is an open source test automation framework for use with native, hybrid, and mobile web applications. The course includes a project where you have to create the test automation for an eCommerce application with a framework and reporting.
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
Learn more at https://www.simplilearn.com/selenium-certification-training
Using Selenium for Automated testing - basic level: short introduction into the selectors and basic methods used in writing a simple script with Selenium Webdriver.
Automation Testing using Selenium WebdriverPankaj Biswas
This will help you to understand about automation testing and when to do automation on your application using selenium. How selenium works, how to find web elements and what operations we can perform on the web elements to do automation.
This presentation covers an introduction to Selenium, the Open Source, cross browser, cross platform functional testing tool. The talk emphasized the importance of applying the same principles to testing (abstraction, refactoring, DRY) that development teams apply to developing software. (This presentation was used for a talk at the Asian Testing Conference)
In this Selenium presentation, we will learn about Selenium and a have a hands-on demo on the working of Selenium IDE and WebDriver. Selenium is an automated testing tool that tests web applications across various platforms and browsers. Selenium IDE, RC, WebDriver, and Grid constitute the Selenium suite. The tutorial video touches upon all the topics related to these components.
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course contains a lot of real-life examples and situations to demonstrate how to use Selenium WebDriver effectively.
The following are the key concepts of Selenium included in the presentation:
1. Manual testing and its limitations
2. What is Selenium
3. Selenium suite of tools
⦁ Selenium IDE with demo
⦁ Selenium RC
⦁ Selenium WebDriver with demo
⦁ Selenium Grid
4. Advantages of Selenium testing
5.Limitations of Selenium testing
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data-Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
12. Execute a project from scratch by building automation framework and automating a few test scenarios
Who should take this Selenium training course?
The course is ideal for :
1. Test Managers
2. Test Engineers
3. Test Lead
4. Test Analyst
5. QA Engineers
6. Software Developers
7. Engineers who want to learn Automation testing
Learn more about https://www.simplilearn.com/selenium-certification-training?utm_campaign=Selenium-Tutorial-For-Beginners-cobEbkTwbwY
This presentation about Selenium WebDriver will help you understand what is Selenium, why Selenium WebDriver was developed, what exactly is Selenium WebDriver, the architecture of Selenium WebDriver and the limitations of Selenium WebDriver. In the end, we'll be looking at a demo showing the working of WebDriver using java. Selenium is an automated testing tool that tests web applications across various platforms and browsers. WebDriver happens to be one of the Selenium tools with a simple yet robust architecture. It controls the browser based on the user program. WebDriver revolutionized automation testing and continues to do so. Let's move further and understand the selenium web driver in detail.
Below are the topics we will be discussing in the presentation:
1. What is Selenium?
2. Why Selenium WebDriver?
3. What is Selenium WebDriver?
4. The architecture of Selenium WebDriver
5. Limitations of Selenium WebDriver
6. Demo: Automation testing with WebDriver
Selenium training has been designed to help developers and manual testers learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. The course includes basic as well as advanced concepts of WebDriver and other tools/frameworks like TestNG, Maven, AutoIT, Sikuli, log4j. Special focus is given on building a robust framework with Page Object Design Pattern, Data-Driven Approach, and creating reusable components to improve productivity. The course also covers the Selenium Grid, which along with TestNG helps achieve parallel execution to improve coverage and reduce execution time for faster feedback. Appium is an open source test automation framework for use with native, hybrid, and mobile web applications. The course includes a project where you have to create the test automation for an eCommerce application with a framework and reporting.
What are the objectives of this Selenium training course?
This course will enable you to:
1. Revise the core Java concepts which are essential for learning Selenium WebDriver
2. Understand the scope of Test Automation in DevOps and fundamentals of Test Automation
3. Create Test Cases using Selenium IDE – Record and Playback tool
4. Understand Selenium WebDriver architecture and various layers of interaction
5. Set up WebDriver project in Eclipse and write test cases using TestNG
6. Locate elements using various locating techniques
7. Work with various WebDriver commands to drive web browser and various WebElement commands to deal with various web components
8. Learn to deal with various possible scenarios in terms of pop-ups, multiple Windows, frames, taking screenshots
9. Implement Page Object Design Pattern and Data Driven Testing
10. Understand how to use Maven, ANT, AutoIT, Sikuli, log4j, and listeners
11. Learn to use Selenium Grid with TestNG for parallel execution
Learn more at https://www.simplilearn.com/selenium-certification-training
Using Selenium for Automated testing - basic level: short introduction into the selectors and basic methods used in writing a simple script with Selenium Webdriver.
Automation Testing using Selenium WebdriverPankaj Biswas
This will help you to understand about automation testing and when to do automation on your application using selenium. How selenium works, how to find web elements and what operations we can perform on the web elements to do automation.
This presentation covers an introduction to Selenium, the Open Source, cross browser, cross platform functional testing tool. The talk emphasized the importance of applying the same principles to testing (abstraction, refactoring, DRY) that development teams apply to developing software. (This presentation was used for a talk at the Asian Testing Conference)
Top 15 Selenium WebDriver Interview Questions and Answers.pptxAnanthReddy38
What is Selenium WebDriver?
Selenium WebDriver is a popular open-source framework used for automating web browsers. It provides a programming interface for interacting with web elements and performing various actions on web applications.
What are the advantages of using Selenium WebDriver?
Some advantages of using Selenium WebDriver include:
Supports multiple programming languages (Java, C#, Python, etc.)
Works with different web browsers (Chrome, Firefox, Safari, etc.)
Provides a rich set of methods for interacting with web elements
Supports parallel test execution
Integrates well with test frameworks and continuous integration tools
How do you launch a browser using Selenium WebDriver?
In Java, you can launch a browser using WebDriver with the following code:
java
WebDriver driver = new ChromeDriver(); // for Chrome browser
How do you locate elements in Selenium WebDriver?
Selenium WebDriver provides various methods to locate elements, such as:
By ID: driver.findElement(By.id(“elementId”));
By Name: driver.findElement(By.name(“elementName”));
By XPath: driver.findElement(By.xpath(“xpathExpression”));
By CSS Selector: driver.findElement(By.cssSelector(“cssSelector”));
What is the difference between driver.findElement() and driver.findElements() methods?
driver.findElement() returns the first matching element on the page, or throws an exception if no element is found.
driver.findElements() returns a list of all matching elements on the page. If no elements are found, it returns an empty list.
How do you perform actions on web elements using Selenium WebDriver?
You can perform actions on web elements using various methods, such as:
sendKeys(): Entering text into input fields.
click(): Clicking on an element.
getText(): Retrieving the text from an element.
getAttribute(): Getting the value of an attribute of an element.
How do you handle checkboxes and radio buttons in Selenium WebDriver?
To handle checkboxes and radio buttons, you can use the click() method to select/deselect them based on their current state.
How do you handle dropdowns or select elements in Selenium WebDriver?
You can handle dropdowns using the Select class in Selenium WebDriver. Here’s an example:
java
Select dropdown = new Select(driver.findElement(By.id("dropdownId"))); dropdown.selectByVisibleText("Option 1"); // Select by visible text
How do you handle alerts and pop-ups in Selenium WebDriver?
To handle alerts and pop-ups, you can use the Alert class in Selenium WebDriver. You can accept, dismiss, or retrieve text from the alert using its methods.
What are implicit waits in Selenium WebDriver?
Implicit waits are used to wait for a certain amount of time for elements to appear on the page. If the element is found before the specified time, the WebDriver will proceed with the next steps immediately
Automation with Selenium Presented by Quontra SolutionsQuontra Solutions
Learn through Experience -- We differentiate our training and development program by delivering Role-Based training instead of Product-based training. Ultimately, our goal is to deliver the best IT Training to our clients.
In this training, attendees learn:
Introduction to Automation
• What is automation
• Advantages of automation & Disadvantages of automation
• Different types of Automation Tools
• What to automate in projects
• When to start automation. Scope for automation testing in projects
• About open-source automation tools
Introduction to Selenium
• What is selenium
• Why selenium
• Advantage and Disadvantages of selenium
Selenium components
• Selenium IDE
• Selenium RC
• Selenium WebDriver
• Selenium Grid
Selenium IDE
• Introduction to IDE
• IDE Installation
• Installation and uses of Firepath, Firebug & Debug bar
• Property & value of elements
• Selenium commands
• Assertions & Verification
• Running, pausing and debugging script
• Disadvantages of selenium IDE
• How to convert selenium IDE Scripts into other languages
Locators
• Tools to identify elements/objects
• Firebug
• IE Developer tools
• Google Chrome Developer tools
• Locating elements by ID
• Finding elements by name
• Finding elements by link text
• Finding elements by XPath
• Finding Elements by using CSS
• Summary
Selenium RC
• What is selenium RC
• Advantages of RC, Architecture
• What is Eclipse/IntelliJ, Selenium RC configure with Eclipse/IntelliJ
• Creating, running & debugging RC scripts
Java Concepts
• Introduction to OOPs concepts and Java
• Installation: Java, Eclipse/IntelliJ, selenium, TestNg/JUnit
• operators in java
• Data types in java
• Conditional statements in java
• Looping statements in java
• Output statements in java
• Classes & Objects
• Collection Framework
• Regular Expressions
• Exception Handling
• Packages, Access Specifiers /Modifiers
• String handling
• Log4J for logging
Selenium Web Driver with Java
• Introduction to WebDriver
• Advantages
• Different between RC and WebDriver
• Selenium WebDriver- commands
• Generate scripts in Eclipse/IntelliJ. Run Test Scripts.
• Debugging Test Script
• Database Connections
• Assertions, validations
• Working with Excel
• Pass the data from Excel
• Working with multiple browser
• Window Handling, Alert/confirm & Popup Handling
• Mouse events
• Wait mechanism
• Rich Web Handling: Calendar handing, Auto suggest, Ajax, browser forward/back navigation, keyboard events, certificate handling, event listeners
.....................For more visit http://www.quontrasolutions.co.uk/selenium-training-classes/
Top 15 Selenium WebDriver Interview Questions and Answers.pdfAnanthReddy38
Supports multiple programming languages (Java, C#, Python, etc.)
Works with different web browsers (Chrome, Firefox, Safari, etc.)
Provides a rich set of methods for interacting with web elements
Supports parallel test execution
Integrates well with test frameworks and continuous integration tools
How do you launch a browser using Selenium WebDriver?
In Java, you can launch a browser using WebDriver with the following
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Edureka!
This Selenium WebDriver tutorial talks about the drawbacks of Selenium RC and what was the need for Selenium WebDriver. It goes into the details of the avantages that WebDriver has over RC and how it replaced RC for automation testing. This tutorial will also tell you how WebDriver works and what are the different browser drivers you can use for testing. Watch the video to get a demonstration on how to locate various elements/ objects on the browser and how operations can be performed on those browser elements/ objects by writing Java code in Eclipse IDE.
Watch the video here: https://www.youtube.com/watch?v=ph3NJm4Z7m4
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...Atirek Gupta
A workshop on understanding how Selenium, Selenium/RC, Webdriver and browser works. Learning what is same origin policy with example. Hands on locating element using CSS and Xpath. Interacting with html with java script Finally developing a page object framework using java, webdriver from scratch.
Enterprise Build And Test In The Cloud
JavaOne 2009 San Francisco
http://www.carlossanchez.eu
Building and testing software can be a time- and resource-consuming task. Cloud computing/on-demand services such as Amazon EC2 provide a cost-effective way to scale applications and, for building and testing software, can reduce the time needed to find and correct problems, meaning a cost reduction as well.
Properly configuring your build tools (Maven, Ant,...), continuous integration servers (Continuum, Cruise Control,...), and testing tools (TestNG, Selenium,...) can enable you to run all the building/testing process in a cloud environment, simulating high-load environments, distributing long-running tests to reduce their execution time, using different environments for client or server applications, and so on -- and in the case of on-demand services such as Amazon EC2, pay only for the time you use it.
In this presentation we will introduce a development process and architecture using popular open source tools for the build and test process such as Apache Maven or Ant for building, Apache Continuum as continuous integration server, TestNG and Selenium for testing, and how to configure them to achieve the best results and performance in several typical use cases (long running testing processes, different client platforms,...) by using he Amazon Elastic Computing Cloud EC2, and therefore reducing time and costs compared to other solutions.
Selenium Automation in Java Using HttpWatch Plug-in Sandeep Tol
This article will give the developers and testers who use Java selenium script for Browser Simulations and automation for IE browser to capture HTTP logs using HTTPWatch Plug-in
HTTP Watch comes with inbuilt API support to integrate with selenium scripts written in C# or PHP scripts . But unfortunately they don’t have Support for JAVA.
The solution given here is to use Java COM bridge and invoke HTTP Watch plugin API from Java based selenium scripts.
Using this article you would learn how HttpWatch plug-in which component can be easily interfaced with Java code and then executed via selenium script.
Similar to Introduction to Selenium Web Driver (20)
Webinar "Differences between Testing in Waterfall and Agile"
presentation by Maria Teryokhina
http://www.exigenservices.ru/webinars/testing-in-waterfall-and-agile
2. Agenda
•What is Selenium 2.0
•Architecture of Selenium 2.0
•Selenium 2.0 API:
• Finding elements
• Basic operations on elements
• Moving between windows and frames
• Explicit and Implicit Waits
•Creating tests using Selenium 2.0
2 www.ExigenServices.com
3. What is Selenium?
Selenium is a set of tools for cross-platform automated testing
of web applications.
Selenium supports:
• IE, Firefox, Safari, Opera and other browsers
• Windows, OS X, Linux, Solaris and other OS’s
• C#, Java, Perl, PHP, Python, Ruby and other languages
• Bromine, JUnit, NUnit, RSpec, TestNG, unittest
3 www.ExigenServices.com
4. Components of Selenium
• Selenium IDE
• Selenium Remote Control (RC)
• Selenium Grid
• Selenium 2.0 and WebDriver
4 www.ExigenServices.com
5. What is Selenium 2.0 ?
Selenium 1.0 Webdriver
IDE
Selenium RC
merge
Selenium Grid
Selenium
Webdriver 2.0
5 www.ExigenServices.com
8. Advantages of Selenium 2.0
• The development and connection of new drivers,
adapted to the specific test environment
• A more "advanced" API for writing tests
• Events generated are the same as for manual testing
• Work with invisible elements is not available
8 www.ExigenServices.com
9. Disadvantages of Selenium 2.0
• Need to create own webdriver for each test
environment
• Only 4 programming languages are supported
9 www.ExigenServices.com
11. Selenium API
WebDriver – to control the browser
WebDriver driver = new FirefoxDriver();
WebElement – to work with the elements on the page
WebElement element =
driver.findElement(By.id(“id”));
11 www.ExigenServices.com
12. WebDriver API
void get(java.lang.String url) – open page
void quit() – close browser
WebDriver.TargetLocator switchTo() – switching
between the popup-E, alert, windows
WebElement findElement(By by) -– find element by
locator
List<WebElement> findElements(By by) – find
elements by locator
12 www.ExigenServices.com
18. Working with windows
Working with browser windows
driver.getWindowHandles()
driver.switchTo().window(windowName)
Working with frames
driver.switchTo().frame( "frameName" );
Working with alerts
driver.switchTo().alert();
18 www.ExigenServices.com
20. Create test
Test Case:
Selenium is in the first line of request for rambler search
Condition:
Browser is open
Steps:
1. Enter “selenium webdriver” into search request
2. Press search button
Expected result:
The first line of request must be a link to the official
Selenium website
20 www.ExigenServices.com
21. Create test
public class Rambler {
protected WebDriver driver;
@Before
public void setUp() throws Exception {
System.out.println("tmp");
// driver = new FirefoxDriver();
driver = new InternetExplorerDriver();
driver.get("http://www.rambler.ru/");
}
21 www.ExigenServices.com
22. Create test
@Test
public void RamblerSearch() throws Exception {
System.out.println(" TC: Selenium is in the first line of request for rambler search");
waitUntilDisplayed(By.cssSelector(Constants.txtRambler));
driver.findElement(By.cssSelector(Constants.txtRambler)).sendKeys("selenium webdriver");
driver.findElement(By.className("pointer")).click();
//wait first result
waitUntilDisplayed(By.cssSelector("div[class='b-left-column__wrapper']"));
assertTrue(driver.findElement(By.cssSelector("div[class='b-podmes_books b-
podmes_top_1']")).getText().contains("Selenium - Web Browser Automation"));
}
22 www.ExigenServices.com
23. Create test
public class Constants {
public static final String txtRambler = "input[class='r--hat-form-text-input']";
}
23 www.ExigenServices.com
24. Create test
@Test
public void RamblerSearch() throws Exception {
System.out.println(" TC: Selenium is in the first line of request for rambler search");
waitUntilDisplayed(By.cssSelector(Constants.txtRambler));
driver.findElement(By.cssSelector(Constants.txtRambler)).sendKeys("selenium webdriver");
driver.findElement(By.className("pointer")).click();
//wait first result
waitUntilDisplayed(By.cssSelector("div[class='b-left-column__wrapper']"));
assertTrue(driver.findElement(By.cssSelector("div[class='b-podmes_books b-
podmes_top_1']")).getText().contains("Selenium - Web Browser Automation"));
}
24 www.ExigenServices.com
25. Create test
public void waitUntilDisplayed(final By locator) {
( new WebDriverWait(driver, 120)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return d.findElement(locator).isDisplayed();
}
});
}
@After
public void tearDown() throws Exception {
//close browser
driver.quit();
}
25 www.ExigenServices.com
28. Structure of the test
1. Use Set UP () and tearDown()
2. All tests should finish with assertion
3. Elements’ locators should be defined in separate
class
28 www.ExigenServices.com