background preloader


Facebook Twitter

Parameterization using XML and DataProviders: Selenium. As we create software we always wish it should work differently with a different set of data.

Parameterization using XML and DataProviders: Selenium

When it comes to testing the same piece of software, we can't be unfair to test it with just one set of data. Here again, we need to verify that our system is taking all set of combinations which it expected to support. Gaurang Shah about Automation: Selenium Grid with Webdriver. WebDriver: Passing parameters to TestCase using testng. Some times there is a need to send parameters (like browser name, browser version ..etc).May be you want to run the same test case with different values for same attribute.

WebDriver: Passing parameters to TestCase using testng

You can achieve above cases by using @parameter annotation in testng Below is the example for running same test cases in different browsers (firefox, chrome) by passing different parameters (browser name, version, profile) TestNg Class getDriverInstance method implimentation public static WebDriver getDriverInstance(String browser,String version,String profile) { WebDriver driver=null; if(browser.equals("firefox")) { DesiredCapabilities capability = DesiredCapabilities.firefox(); capability.setVersion(version); capability.setCapability(FirefoxDriver.PROFILE, profile); driver = new FirefoxDriver(capability); } else if(browser.equals("chrome")) { DesiredCapabilities capability =; capability.setVersion(version); driver = new ChromeDriver(capability); } return driver; } TestNg Suite Happy coding :) Software Functional Test Automation: DataProvider - Data Driven Testing with Selenium and TestNG. Data-Driven testing generally means executing a set of steps with multiple sets of data.

Software Functional Test Automation: DataProvider - Data Driven Testing with Selenium and TestNG

Selenium does not provide any out-of-the box solution for data driven testing but leaves it up to the user to implement this on his own. People who are familiar with QuickTest Professional or QTP would know Datatables (Global & Action) that allows the scripter to link a action or a function with multiple rows of data. TestNG is a framework that makes data-driven testing possible in selenium. TestNG is a testing framework created in line with Junit but with added features that makes it suitable for use in regression test automation projects.

DataProvider is one such feature in testng; it allows a test method to be executed with multiple sets of data. A DataProvider is data feeder method defined in your class that supplies a test method with data. In the example above createData() is the DataProvider function that is sending out test data in the form of array of array of objects (object[][]). Part 1. Selenium Blog: Finding the broken links in a webpage using Selenium. We heard about some Firefox plug-ins to find broken links in a webpage, like Link Checker, Xenu and etc.

Selenium Blog: Finding the broken links in a webpage using Selenium

We need to install these plug-ins with Firefox browser and find the broken URLs or 404 pages. We can write the Selenium script for the same functionality. How can we do that? We need to find the number of links available on the pageWe need to track each and every linkFinally we can get the response code for each and every URL or link with the help of HttpURLConnection Class and getResponseCode method. How to find the number of links on the page? Selenium-webdriver. RubyBindings - selenium - Ruby bindings - Browser automation framework. The Ruby bindings for Selenium/WebDriver are available as the selenium-webdriver gem.

RubyBindings - selenium - Ruby bindings - Browser automation framework

The web page explains how to install the selenium-webdriver gem. On Mac OSX and linux you may need to prefix the rest of the command with the sudo command if the installation fails because of security restrictions on your computer. There are many other Selenium gems out there, but this is the only official, maintained gem. If you're looking for a slightly higher level API built on the same technology, you may want to check out watir-webdriver or capybara. Google Open Source Blog: Test Your Mobile Web Apps with WebDriver - A Tutorial. Our first “by the numbers” post was about what countries this year’s accepted Google Summer of Code students are from - all 73 countries - which made for a big list.

Google Open Source Blog: Test Your Mobile Web Apps with WebDriver - A Tutorial

This time we’re serving up a mix of interesting stats in smaller charts. "How old are the students? " Google Summer of Code is for students ages 18 and older - but note the lack of an upper limit. While most of the students are relatively young, we also welcome non-traditional students to participate. This year our oldest student is 57. “Am I the only undergraduate in the program?” "How many women are participating in GSoC 2014? " We are very pleased to report that just over 10% of this year’s accepted students are women. We will be doing additional posts about the statistics for GSoC 2014 in the next few weeks. By Cat Allman, Open Source Programs. Android webdriver demo. Selenium-2-mobile-web-testing. AndroidDriver - selenium - Browser automation framework. Use Selendroid instead.

AndroidDriver - selenium - Browser automation framework

Android WebDriver allows to run automated end-to-end tests that ensure your site works correctly when viewed from the Android browser. Android WebDriver supports all core WebDriver APIs, and in addition to that it supports mobile spacific and HTML5 APIs. Android WebDriver models many user interactions such as finger taps, flicks, finger scrolls and long presses. It can rotate the display and interact with HTML5 features such as local storage, session storage and application cache. We try to stay as close as possible to what the user interaction with the browser is.

Supported Platforms The current apk will only work with Gingerbread (2.3.x), Honeycomb (3.x), Ice Cream Sandwich (4.0.x) and later. Useful Related Links Install the Android SDK Download the Android SDK, and unpack it to ~/android_sdk/. Setup the Environment Android WebDriver test can run on emulators or real devices for phone and tablets. Setup the Emulator First, let's create an Android Virtual Device (AVD): Selenium WebDriver — Selenium Documentation.

NOTE: We’re currently working on documenting these sections.

Selenium WebDriver — Selenium Documentation

We believe the information here is accurate, however be aware we are also still working on this chapter. Additional information will be provided as we go which should make this chapter more solid. Introducing WebDriver The primary new feature in Selenium 2.0 is the integration of the WebDriver API.