Saturday, 19 December 2015

Execute protractor script on real android device using Appium

1. Protractor is already installed.
    Protractor installation steps

3. Java JDK can be downloaded and installed from

4. Set the Environment variable for JAVA

5. Install Android SDK

6. Set the Environment variable for Android SDK.

7. Configuring 'Protractor' in 'WebStorm IDE'.
     Running the 'Protractor' script in 'WebStorm'.

8. Install Appium Server for windows os.

9. Install Phone Drivers

10. Enable Developer options in the mobile device.

11. Enable USB Debugging in Mobile Device.

Protractor script and configuration changes:
1. Copy 'todo-spec.js' and 'conf.js' from url

2. Modify the 'conf.js' to include the appium configuration.
exports.config = {
    seleniumAddress: 'http://localhost:4723/wd/hub',
    specs: ['todo-spec.js'],

    capabilities: {
        browserName: 'chrome',
        platformName: 'android',
        //platformVersion: '',
        deviceName: ''

4. Connect real android device to your PC.

5. Run 'adb devices' and verify abd detects your android mobile device.

6. Launch Appium Server

7. Execute the protractor script.
        - Protractor script is executed on your real android device.

No comments:

Post a Comment