Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

pytest krtech common library

Project Description
================================
Krtech common library for pytest
================================

Selenium web elements wrapper library based on allure report.
Contains base elements, pages and methods (steps).

------------
Installation
------------
You can install using pip:
::
pip install pytest-krtech-common

-------------
Configuration
-------------
To configure ``conftest.py`` do:

code:: python
import pytest
from configuration import TestConfig, ConftestOptions

class OverwrittenTestConfig(TestConfig):
myprop = "myprop_value"
mysqldb = "mydb"

tc = OverwrittenTestConfig()
c = ConftestOptions(tc)


def pytest_addoption(parser):
c.pytest_addoption(parser)


@pytest.mark.tryfirst
def pytest_runtest_makereport(item, call, __multicall__):
return c.pytest_runtest_makereport(item, call, __multicall__)


@pytest.yield_fixture(scope='session')
def config(request):
op = c.config(request)
yield op
op.driver.close()

-----
Usage
-----
Pages:

code:: python
from selenium.webdriver.common.by import By
from krtech.decorators import page
from krtech.elements.base_element import BaseElement
from krtech.pages.base_page import BasePage

@page('Profile Page', By.ID, 'profilePageId')
class ProfilePage(BasePage):
HEADER = BaseElement("Profile page header", By.XPATH, ".//h6")

Tests:

code:: python
from youproject.pages.profile_page import ProfilePage
from krtech.steps.user_steps import UserSteps

@pytest.mark.usefixtures('config')
@allure.feature('Profile Header')
class TestProfile:

def test_profile_header(self, config):
user = UserSteps(config)
profile_page = ProfilePage(config)

user.opens('/profile')
user.should_see_element_matched_to(profile_page.PROFILE, equal_to_ignoring_case(c.customers_data.name))
user.should_see_attribute_value(profile_page.OTHER, 'disabled', True)


-------------
Wheel package
-------------
To build a wheel package do::
cd pytest-krtech-common/
python setup.py bdist_wheel

Package should be available at::
dist/pytest_krtech_common-0.1-py3-none-any.whl

To install from wheel do::
pip install pytest_krtech_common-0.1-py3-none-any.whl
Release History

Release History

This version
History Node

0.1.35

History Node

0.1.34

History Node

0.1.33

History Node

0.1.32

History Node

0.1.31

History Node

0.1.30

History Node

0.1.29

History Node

0.1.28

History Node

0.1.27

History Node

0.1.26

History Node

0.1.25

History Node

0.1.24

History Node

0.1.23

History Node

0.1.22

History Node

0.1.21

History Node

0.1.20

History Node

0.1.19

History Node

0.1.18

History Node

0.1.17

History Node

0.1.16

History Node

0.1.15

History Node

0.1.14

History Node

0.1.13

History Node

0.1.12

History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pytest_krtech_common-0.1.35-py3-none-any.whl (22.4 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Nov 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting