Download presentation
Presentation is loading. Please wait.
1
LOGO Tech propulsion Labs Android Webdriver Test automation - Selenium 2 Masud Parvez SQA Architect Tech Propulsion Labs Email:masud@techprulsionlabs.com
2
All copyright is reserved by Tech propulsion labs Contents What is Selenium ? 1 Selenium Versions 2 Life of Web story 3 Impact of JS 4
3
Contents Mobile application testing 5 Android and Selenium 2 6 WebDriver 7 Why Webdriver ? 8
4
Contents Android Test architecture 9 Setup selenium for Android 10 How are we doing? 11 Limitations 12
5
Contents Demo 13 Guide line for python 14 Way to walk in the future with us 15 16 Questions and Answers
6
What is selenium ? Selenium is a suite of tools to automate web app(!!!!) testing across many platforms. Selenium runs in many browsers and operating systems. Free wear
7
Selenium versions Selenium 1 -------------- --------------- Selenium 2 b-1 January Selenium 2 July 200420082011
8
Updates in Selenium 2 1 23 4 Mobile application testing. Fire fox 4, 5, 6, 7 Experimental IE9 and chrome support WebDriver
9
Why do we need Selenium? ? ? ? ? Selenium
10
Life before the Web Total Application Market
11
Yesterday Total Application Market HTML +JS
12
Data Total Application Market
13
Today HTML JS Total Application Market
14
Tomorrow HTML JS Total Application Market
15
Today HTML JS Total Application Market Selenium Lives here
16
Tomorrow HTML JS Total Application Market Selenium Lives here
17
Mobile application testing 1 iPhone/ iPad 2 Android 3 WP7
18
Android and selenium 2 Android driver
19
Webdriver New tech that Selenium 2 Test direct access browser No proxy server New API
20
Why Webdriver ? WebElement.findElement is universal - all UIs are trees Web has DOM (elements) Windows has HWND Android has Views
21
Why Webdriver ? Many operations are universal between all UIs Matching: clear click findElement(By.id)
22
Why Webdriver ? Extensible API WebDriver API extensions, such as Rotatable, RenderedWebElement, are implemented by a subset of drivers. Creating a new API for every platform is cumbersome instead: Emphasize the similarities with the core WebDriver API Supply simple platform-specific extensions as needed. Facilitate piece-wise code re-usage
23
Android-Driver Interaction architecture
24
Setup selenium for Android Phase 1 Phase 2 Phase 3 Set up Emulator Set up SDKStart Emulator
25
Setup selenium for Android Phase 4 Phase 5 Phase 6 Port Forwarding Install the AppRun your test
26
Download Android SDK Web link: www. http://developer.android.com/sdk/index.html
27
Installation Command Update SDK./android update sdk Create Emulator./android create avd --target 2 --name newavd Run emulator./emulator.exe -avd newavd
28
Installation Command Install android driver in emulator./adb install name_and Forward port./adb forward tcp:8080 tcp:8080 If You are using eclipse then install ADT kit
29
Script // Calling android driver AndroidDriver driver = new AndroidDriver(); // And now use this to visit Google driver.get("http://google.com"); // Find the text input element by its name WebElement element = driver.findElement(By.name("q")); // Enter something to search for element.sendKeys("Tech Propulsion Labs");
30
Script // Now submit the form. WebDriver will find the form for us from the element element.submit(); // Check the title of the page System.out.println("Page title is: " + driver.getTitle()); //Turn off the driver driver.quit();
31
Limitations Slower than Headless WebKit Driver Support for SDK versions 2.2 and prior, has been deprecated Does not work on emulators running 2.3 because of an emulator bug that should be fixed soon by Android. However it works on Devices running 2.3 and higher
32
DEMO
33
QUESTION
34
By python To install the Python client library: # pip install -U selenium Import the Selenium 2 namespace from selenium import webdriver iPhone driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub') Android driver = webdriver.Remote(browser_name="android", command_executor='http://127.0.0.1:8080/hub') Google Chrome driver = webdriver.Chrome() Firefox driver = webdriver.Firefox()
35
Way to walk in the future with us Blog: www.masudparvez.weebly.com/blog Post in blog regarding this topic http://masudparvez.weebly.com/1/post/2011/08/an driod-webdriver-want-to-test.html
36
Way to walk in the future with us Android.apk Automation Test link: http://www.youtube.com/watch?v=yi6Z3l0ci1o&fe ature=mfu_in_order&list=UL Selenium automation framework Link: http://www.youtube.com/watch?v=wpudDb3ECPA &feature=mfu_in_order&list=UL
37
Copyright 2011 Tech Propulsion Labs, Inc. Masud Parvez SQA Architect Email: masud@techpropulsionlabs.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.