Git Product home page Git Product logo

gubba-jaydeep / robotframework-anywherelibrary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luisxiaomai/robotframework-anywherelibrary

0.0 1.0 0.0 906 KB

AnywhereLibrary is a cross platform(desktop browser,Android,iOS) testing library for Robot Framework that leverages the [Selenium 2(WebDriver)] libraries internally to control a web browser and [appium] as mobile test automation framework for use with native and hybrid app.

License: MIT License

Objective-C 16.67% Python 83.33%

robotframework-anywherelibrary's Introduction

PyPI version Build status codecov Join the chat at https://gitter.im/anywherelibrary/Lobby GitHub license

Introduction

AnywhereLibrary is a cross platform (desktop browser, Android, iOS) testing library for Robot Framework that leverages the Selenium 2 (WebDriver) libraries internally to control a web browser and Appium as mobile test automation framework for use with native and hybrid apps.

This library is especially suitable for handling SPA (single-page apps) with responsive design patterns. With this you only need to generate a set of scripts to cover all platforms (desktop browser, Android, iOS).

On the other hand, no any UI test automation framework is made for your real business. If this library isn't be suitable for your business, it's highly recommed that you fork this repository as a prototype for UI test automation. Customize your own AnywhereLibrary in accordance to your actual business requirements.

Installation

The recommended installation method is using pip:

pip install robotframework-anywherelibrary

Directory Layout

doc/

Keyword documentation.

sample-code/

A sample test case which can run in desktop browser, sample Android and iOS webview apps with different platform parameter inputs.

src/base

Python source code.

src/cfg

Configuration file which stores all parameters for initializing the driver.

Usage

To write tests with Robot Framework and AnywhereLibrary, AnywhereLibrary must be imported into your RF test suite. See Robot Framework User Guide for more information.

As it uses Appium for its mobile solution, please make sure your Appium server is up and running. For how to use Appium, please refer to the Appium Documentation.

Before Running the Test Case

You must use the Initial Driver keyword with platfrom value as the paramter input; after the test case you must use Tear Down Driver keyword to tear down the related driver. Also you need do some modifications in configuration.xml file in /AnywhereLibrary/cfg.

Locating elements

All keywords in AnywhereLibrary that need to find an element on the page take an argument, locator. AnywhereLibrary supports a subset of the WebDriver locator strategies. Currently available locator strategies are:

find by "class" (i.e., ui component type)
find by "xpath" (i.e., an abstract representation of a path to an element, with certain constraints)

Supported strategies are:

Strategy Example Description
xpath Click //div[@id='my_element']
xpath Click xpath=//div[@id='my_element']
class Click class=android.widget.Button
... Coming soon... Coming soon...

Running Sample Cases

pybot --variable platform:chrome webviewTest.txt
pybot --variable platform:firefox webviewTest.txt
pybot --variable platform:iphone webviewTest.txt

Documentation

Keywords at a Glance:

  • Initial Driver
  • Tear Down Driver
  • Click
  • Type
  • Element Find
  • Get Text
  • Get Value
  • Verify Text
  • Verify Value
  • Is Element Present
  • Page Should Contain Element
  • Page Should Not Contains Element
  • Wait For Element Present
  • Wait No Such Element Present
  • Switch To Native
  • Switch To Webview
  • Capture Page Screenshot
  • Execute Javascript
  • mobile gestures
    • Coming Soon...

More details about keyword documentation could be found at Keyword Documentation

Plan

  • Add more keywords.

FAQ

TODO

License

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.