Skip to main content

Pyppium is a wrapper of Appium-Python-Client for cross mobile testing.

Project description

Pyppium

made-with-python codecov Documentation Status

Pyppium is a wrapper of Appium-Python-Client for cross mobile testing.

Installation

$ pip install pyppium

Basic Usage

Create your screen like this

from pyppium.fetcher import fetch, iOS, Android


class ScreenOne:
    _button = fetch(iOS("id", "buttonSignIn"), Android("id", "button"))
    _text_field = fetch(iOS("id", "inputUserName"), Android("id", "username"))
    _text_password = fetch(iOS("id", "InputPassword"), Android("id", "pass"))

    def login(self, username, password):
        self._text_field.send_keys(username)
        self._text_password.send_keys(password)
        self._button.click()

    

User your screen in test after start pyppium driver

from pyppium.driver import PyppiumDriver
from tests.e2e.screens.screen import ScreenOne, ScreenTwo
from assertpy import assert_that


def test_android_basic_behaviours():
    username = "Lully"
    password = "123456789"

    caps_android ={
            "platformName": "Android",
            "automationName": "uiautomator2",
            "deviceName": "Android Emulator",
            "appPackage": "com.example.dummy",
            "appActivity": "MainActivity",
            "newCommandTimeout": 0,
    }


    PyppiumDriver(caps_android)
    ScreenOne().login(username, password)
    assert_that(ScreenTwo().label_welcome_message()).contains(username)
    PyppiumDriver.quit()

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyppium-0.1.0.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

pyppium-0.1.0-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page