Presentation is loading. Please wait.

Presentation is loading. Please wait.

Selenium & Web Accessibility Nishant Singh Sumedha Mitra Vivek Gupta Vishesh Mangal Biswajeet Mandal Srivash Kangsabanik.

Similar presentations


Presentation on theme: "Selenium & Web Accessibility Nishant Singh Sumedha Mitra Vivek Gupta Vishesh Mangal Biswajeet Mandal Srivash Kangsabanik."— Presentation transcript:

1 Selenium & Web Accessibility Nishant Singh Sumedha Mitra Vivek Gupta Vishesh Mangal Biswajeet Mandal Srivash Kangsabanik

2 Contents Test Automation using Selenium Introduction to Test Automation & Selenium Need Components & Features Selenium IDE Selenium RC Selenium Web Driver Selenium Grid Selenese Commands Working of Selenium Components of Selenium Test Script Parameterization Best Practices

3 Introduction to Test Automation & Selenium Test Automation  To set test preconditions.  To control the execution of tests.  To compare the actual outcomes to predicted outcomes.  To report the Execution Status Selenium - Selenium is a robust set of tools that supports rapid development of test automation for web-based applications. - Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. - Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.

4 Need Frequent regression testing Repeated test case Execution is required User Acceptance Tests Faster Feedback to the developers Reduce the Human Effort Test same application on multiple environments

5 Components & Features Components Selenium IDE Selenium Remote Control Selenium Web Driver Selenium Grid Features Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers. Allows scripting in several languages like Java, C#, PHP and Python. Assertion statements provide an efficient way of comparing expected and actual results. Inbuilt reporting mechanism.

6 Selenium IDE Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and replay the test in Firefox. Selenium IDE allows you to save tests as HTML, Java, Ruby scripts, or any other format. It allows you to automatically add assertions to all the pages. Allows you to add Selenese commands as and when required.

7 Selenium RC A solution to cross browser testing. A server, written in Java and so available on all the platforms. Acts as a proxy for web requests from them. Client libraries for many popular languages. Bundles Selenium Core and automatically loads into the browser

8 Selenium Web Driver WebDriver is a tool for automating both the web and Android based applications. WebDriver makes direct call to the browser using each browser's native support for automation Supports many browsers and many languages Improves consistency between browsers and offers great API No Intermediate is required as in case of selenium RC Faster than Selenium RC Runs in all latest browsers.

9 Selenium Grid Selenium Grid allows the Selenium RC solution to scale for test suites or test suites to be run in multiple environments. With Selenium Grid multiple instances of Selenium RC are running on various operating system and browser configurations, each of these when launching register with a hub. When tests are sent to the hub they are then redirected to an available Selenium RC, which will launch the browser and run the test. This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test.

10 Selenese Commands click/clickAndWait - performs a click operation, and optionally waits for a new page to load. VerifyTitle/assertTitle - verifies an expected page title. VerifyTextPresent - verifies expected text is somewhere on the page. VerifyElementPresent - verifies an expected UI element, as defined by its HTML tag, is present on the page. VerifyText - verifies expected text and its corresponding HTML tag are present on the page. VerifyTable - verifies a table’s expected contents. WaitForPageToLoad - pauses execution until an expected new page loads. Called automatically when clickAndWait is used. WaitForElementPresent - pauses execution until an expected UI element, as defined by its HTML tag, is present on the page. AssertTextPresent - This will assert if the text is present in the page. AssertText - This will assert if a particular element is having the particular text. AssertTitle - This will assert if the page is having a proper title. AssertValue - This will assert if a Text box or check box has a particular value AssertElementPresent - This will assert if a particular UI Element is present in the page.

11 Working of Selenium

12 Components of Selenium Test Script setUp method This method prepares the selenium server to run the test. This method basically hooks to the selenium server and opens up the base URL of the application test*** method The methods with the name test will actually run the tests on the application. There can be any number of test methods in the app tearDown method This method will run after the end of the test. This test will disconnect with the server and makes room for the next tests to run the tests.

13 Parameterization Parameterization is to same run the script with multiple set of data. The data will be stored in a CSV file. We will have write a program to read the values from the excel line by line and replace the values. For reading the values from a CSV file we will require the following packages import java.io.File; import java.io.BufferedReader; import java.io.FileReader; import java.util.StringTokenizer;

14 Best Practices Use Selenium to verify workflow and session Don't put Selenium tests in your main development build – run them overnight Have dedicated machines that run tests Relatively easy to automate web UI tests Record/Replay for regression tests RC allows integration with CI and JUnit/FitNesse tests

15 Contents Web Accessibility Introduction Need Importance of Accessibility Accessibility Standards Essential Components Accessibility Barriers Principles of Accessibility

16 Introduction Making web accessible to people with disabilities so that they can perceive, understand, navigate, and interact with the Web. Web accessibility encompasses all disabilities that affect access to the Web, including visual, auditory, physical, speech, cognitive, and neurological disabilities.

17 Need The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect." Tim Berners-Lee

18 Importance Accessible design benefits everyone  Older technology  Slow connection speeds  Newer wireless technology  Personal preference!

19 Accessibility Standards Web Content  refers to any part of a website, including text, images, forms,and multimedia, as well as any markup code, scripts, applications, and such. User Agents  software that people use to access web content, including desktop graphical browsers, voice browsers, mobile phone browsers, multimedia players, plug-ins, and some assistive technologies. Authoring Tools  software or services that people use to produce web content, including code editors, document conversion tools, content management systems, blogs, database scripts, and other tools. (Continued...)

20 Standards Workforce Investment Act (1998) included amendments to the Rehabilitation Act Section 501 requires reasonable accommodations for employees with disabilities Section 504 prohibits discrimination of persons with disabilities by Federal agencies in any federally funded or federally conducted programs or activities

21 Essential Components content - the information in a Web page or Web application, including:  natural information such as text, images, and sounds  code or markup that defines structure, presentation, etc. Web browsers, media players, and other "user agents" assistive technology, in some cases - screen readers, alternative keyboards, switches, scanning software, etc

22 Essential Components(contd.) users' knowledge, experiences, and in some cases, adaptive strategies using the Web developers - designers, coders, authors, etc., including developers with disabilities and users who contribute content authoring tools - software that creates Web sites evaluation tools - Web accessibility evaluation tools, HTML validators, CSS validators, etc.

23 Accessibility Barriers Visual Auditory Mobility

24 Visual Disabilities Blindness Weak vision Tunnel vision Dimness Extreme near- or far-sighted Color blindness

25 Hearing Disabilities Deaf Hard of hearing High/low frequency hearing loss

26 Mobility Disabilities Repetitive Stress Injuries (RSI) Arthritis Stroke Spinal Cord Injuries ALS Loss of limbs or digits

27 Principles of Accessibility Web accessibility Standards Perceivable Information & User Interface Operable User Interface & Navigation Understandable Information & User Interface Robust Content & Reliable Interpretation


Download ppt "Selenium & Web Accessibility Nishant Singh Sumedha Mitra Vivek Gupta Vishesh Mangal Biswajeet Mandal Srivash Kangsabanik."

Similar presentations


Ads by Google