Giter Club home page Giter Club logo

appiumserenitypoc's Introduction

This project shows Appium and Serenity framework integration to run sample test case on native Android app.

Before Run Settings

  1. Have a android emulator or device connected and running
  2. ANDROID_HOME environment varialbe to be set ( + For Eclipse Run As > Run Configurations .... > Environment )
  3. appium.platformVersion = set_valid_value
  4. appium.deviceName = set_valid_value
  5. appium.app = set_full_path

Note:

  1. Please run and review the code
  2. If you think something needs to be improved; please file issue or submit PR.

How To Run From Command Line

  1. mvn clean verify
  2. From Eclipse FlipkartAppCucumber , verifyInvalidLogin Run or Debug As JUnit Test



Living Documentation

  1. http://vikramvi.github.io/AppiumSerenityPOC

Native App Interrogating Methods:


Method 1:

1.1  with arc command

1.2  Run arc command which takes caps from appium.txt and launches app on mobile in this case

1.3 You can now easily play with app with commands like
page_class, page, @driver.methods,  @driver.find_element(:id,....).click



Method 2:

2.1 with irb command

2.2 run irb command

2.3 Later run below commands in sequenc

2.3.1 require 'appium_lib'

2.3.2 caps = {
caps: {
platformName: "Android",
platformVersion: "5.0.1",
deviceName: "d6e4f8d6",
app: 'FULL_PATH/Flipkart.3.0.apk',
newCommandTimeout: '9999'
},
appium_lib: {
server_url: 'http://localhost:4723/wd/hub',
wait: 300
}
}

2.3.3 Appium::Driver.new(caps).start_driver

2.3.4 Appium.promote_appium_methods Object

2.4  You can now easily play with app with commands like
page_class, page, @driver.methods,  @driver.find_element(:id,....).click



Why this is better than using Appium Client ?

I find this Ruby way of playing with app ( REPL ) much easier than Appium Client as later is slower and buggier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.