Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.

Slides:



Advertisements
Similar presentations
A Bluffer's Guide to Selenium 2 By: Simon Stewart & Anthony Long.
Advertisements

A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Lecture 3B: Client-Side Scripting IT 202—Internet Applications Based on notes developed by Morgan Benton.
LOGO Tech propulsion Labs Android Webdriver Test automation - Selenium 2 Masud Parvez SQA Architect Tech Propulsion Labs
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Android Application Development 2013 PClassic Chris Murphy 1.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
User Extensions, RC and Web Driver Anton Angelov QA Engineer SystemIntegrationTeam Telerik QA Academy Telerik QA Academy.
ExtWebDriver Open Source Project Daniel Koo Latha Nagaraj Bryan Robbins 04/23/2014.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Val Kravets, Luis Sanchez, Allen Chung, Phillip Anderson, Leyla Norooz, Brian Ramnarian, Todd Watson.
Robot Framework – Basic Level. Date: Version:1.0 Page 1.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 6: Links.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
And the PageObject Design Model.  How Selenium Remote Control works  You launch a server on your test machine.  Your tests connect to that server via.
Web Automation Testing With Selenium By Rajesh Kanade.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
Lec 19 Web Driver 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 19 Selenium Web Driver 11/4/
Lec 18 Web with Selenium 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 16 Testing Web Applications 10/23/
Unit 13 –JQuery Basics Instructor: Brent Presley.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Tata Consultancy Services1 WebDriver Basics Submitted By : Akhil K Gagan Deep Singh Naveenrajha H M Poornachandra Meduri Shubham Utsav Sunil Kumar G Vivek.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
SAFARI TEST AUTOMATION: NAVIGATING THROUGH THE JUNGLE BY KARAN KUMAR AND JAMES CHUONG.
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Introduction of Selenium Eli Lu 2016/10/13. Outline What is selenium ? Selenium Projects Selenium Sponsors Easy to use Useful Feature & Tools Useful Links.
DHTML.
Test Web applications using Selenium
Selenium HP Web Test Tool Training
The Zen of UI Test Automation
Applied Component I Unit II Introduction of java-script
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Automating GUI testing with Selenium WebDriver, Java and Eclipse
Selenium WebDriver Web Test Tool Training
Testing Your Alfresco Add-ons
CSCE 747 Software Testing and Quality Assurance
AJAX.
Onlineitguru Selenium is one of the most widely used open-source tool that is used for testing software or Automation. It is licensed under Apache License.
Haden Jackson-Robbins
Test Automation For Web-Based Applications
Selenium HP Web Test Tool Training
Test Automation For Web-Based Applications
Test Automation For Web-Based Applications
Test Automation For Web-Based Applications
Selenium HP Web Test Tool Training
© University of Liverpool
Presentation transcript:

Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel

2 Day 10 Selenium 2 (WebDriver)

 Selenium is a test automation framework that interacts with a browser via javascript  WebDriver is a test automation framework that interacts with the browser directly  Selenium 2 is the merging of the Open Source "selenium" and "webdriver" projects The most recent release is Selenium

 Better support for IE ◦ Still a huge part of the market  Support for testing mobile browsers ◦ Android ◦ iPhone ◦ Blackberry ◦ … other  Not trapped in the JS sandbox ◦ So there's a way to handle "alerts" on window load cleanly. ◦ Better emulation of user input, such as clicking and typing.  Cleaner API ◦ So it's easier to write and maintain code. ◦ Far less confusion about which method to call.

 Output relative to input; the amount passing  Download Selenium2 server and client jars from:  Drop JARs into lib ◦ Add jars to Build path.  In your Java code o Replace "DefaultSelenium" with "WebDriverBackedSelenium“ o Example: WebDriver driver = new FirefoxDriver(); String baseUrl = " Selenium selenium = new WebDriverBackedSelenium(driver, baseUrl);

 Pros ◦ Allows for the WebDriver and Selenium APIs to live side- by-side ◦ Provides a simple mechanism for a managed migration from the Selenium RC API to WebDriver’s ◦ Does not require the standalone Selenium RC server to be run  Cons ◦ Does not implement every method ◦ More advanced Selenium usage (using “browserbot” or other built-in JavaScript methods from Selenium Core) may not work ◦ Some methods may be slower due to underlying implementation differences

may not need the Selenium Server  If you will be strictly using the WebDriver API you may not need the Selenium Server. WebDriver makes direct calls to the browser. You will need the Selenium Server:  If you are using Selenium Grid - to distribute your tests over many machines  If you want to connect to a remote machine that has a particular browser version that is not on your current machine.

 Simpler programming interface  Object-oriented API that provides support for a larger number of browsers along with improved support for modern advanced web- app testing problems  Full list of packages, classes, and interfaces with documentation can be found here: cs/api/java/index.html

WebDriver is the name of the key interface, but there are several implementations:  FirefoxDriver  ChromeDriver **  HtmlUnitDriver  InternetExlorerDriver  AndroidDriver **  iPhoneDriver **  RemoteDriver  OperaDriver  SafariDriver **

 To create a WebDriver Instance: WebDriver var_name = new ImplOfWebDriver() WebDriver driver; driver = new InternetExplorerDriver();OR driver = new FirefoxDriver();OR System.setProperty("webdriver.chrome.driver", "C:\\path_to_executable\\chromedriver.exe"); driver = new ChromeDriver();OR driver = new OperaDriver(); WebDriver driver; driver = new InternetExplorerDriver();OR driver = new FirefoxDriver();OR System.setProperty("webdriver.chrome.driver", "C:\\path_to_executable\\chromedriver.exe"); driver = new ChromeDriver();OR driver = new OperaDriver(); driver.quit(); Don’t forget to shutdown the driver when you’re through: driver.quit();

CommandDescription getTitlegetTitle()The title of the current page. switchToswitchTo()Send future commands to a different frame or window. getget(jString url)Load a new web page in the current browser window. navigatenavigate()Allows the driver to access browser's history and to navigate to a given URL findElementfindElement(By by)ByFind the first WebElement using the given method.WebElement findElementsfindElements(By by)ByFind all elements within the current page using the given mechanism. Return a List of WebElements.

CommandDescription clickclick()Click this element. getTextgetText()Get the visible text submitsubmit()If this current element is a form, or an element within a form, then this will be submitted to the remote server. sendKeys sendKeys (keysToSend) Use this method to simulate typing into an element, which may set its value. isSelectedisSelected()Determine whether or not this element is selected or not. isEnabledisEnabled()Is the element currently enabled or not? This will generally return true for everything but disabled input elements. getAttribute getAttribute (String name) the value of a the given attribute of the element. findElement (By by)By Find the first WebElement using the given method.WebElement findElements (By by)By Find all elements within the current page using the given mechanism. Return a List of WebElements.

“Find” methods take a locator called “By” StrategiesDescription id By.id(“UI_Element_Id") This is the most efficient and preferred way to locate an element. className By.className("cheese") “Class” in this case refers to the attribute on the DOM element. tagName By.tagName(“table") The DOM Tag Name of the element. name By.name(“cancel_button") Find the input element with matching name attribute linkText By.linkText(“Log In") Find the link element with matching visible text. cssSelector By.cssSelector ("#food span.dairy.aged") Locator strategy by css. Note: some css that might work in one version may not work in another. xpath By.xpath("//input") Note: some unexpected behaviour unless you are aware of the differences in the various xpath engines.