• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html). It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.

Webium

PyPI Python Versions Build Status

Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html).

It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.

Installation

The latest stable version is available on PyPI:

pip install webium

Usage

Main classes are:

  • webium.Find
  • webium.Finds
  • webium.BasePage

Basic usage example:

from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from webium.controls.link import Link
from webium.driver import get_driver
from webium import BasePage, Find, Finds


class GooglePage(BasePage):
    url = 'http://www.google.com'

    text_field = Find(by=By.NAME, value='q')
    button = Find(by=By.NAME, value='btnK')


class ResultItem(WebElement):
    link = Find(Link, By.XPATH, './/h3/a')


class ResultsPage(BasePage):
    stat = Find(by=By.ID, value='resultStats')
    results = Finds(ResultItem, By.XPATH, '//div/li')


if __name__ == '__main__':
    home_page = GooglePage()
    home_page.open()
    home_page.text_field.send_keys('Page Object')
    home_page.button.click()
    results_page = ResultsPage()
    print('Results summary: ' + results_page.stat.text)
    for item in results_page.results:
        print(item.link.text)
    get_driver().quit()

More usage details are available here: http://wgnet.github.io/webium/

More Repositories

1

befw

BEFW
Go
115
star
2

wg_forge_backend

Тестовое задание WG Forge (Backend)
49
star
3

grail

Grail is a library which allows test script creation based on steps. It helps to structure your tests and get rid of additional test documentation for your code.
HTML
37
star
4

wgtf

Wargaming Tools Framework
C++
32
star
5

wg_forge_frontend

JavaScript
23
star
6

spark-kafka-streaming

Custom Spark Kafka consumer based on Kafka SimpleConsumer API.
Scala
22
star
7

aiohttp_baseapi

Micro framework on top of aiohttp
Python
11
star
8

wgforge_platform_frontend_course

WGForge Platform Frontend Course
JavaScript
10
star
9

globalmap

Global Map is a metagame by Wargaming. Here you can find data used for rendering, and a set of libraries that make geodata manipulation a lot easier.
PLpgSQL
10
star
10

clacks

Modular TCP server for Technical Artists and programmers
Python
9
star
11

wgconfig

provides ini config files support
Erlang
8
star
12

herd

general purpose erlang utils
Erlang
8
star
13

fox

Client library for RabbitMQ build on top of amqp_client.
Erlang
8
star
14

gosura

Go client for the Hasura API
Go
8
star
15

sheep2

Erlang
6
star
16

wg_push

Erlang library for working with Apple Push Notification Service
Erlang
6
star
17

wunderdns

Multitenant API for PowerDNS PostgreSQL database.
Go
6
star
18

wiregen

Efficient binary protocol generator.
Rust
6
star
19

sdbmigrate

Sharding DB migration tool
Python
5
star
20

aiohttp_prometheus_monitoring

Python
5
star
21

arsenalqa

Python
5
star
22

twoost

Tools for Twisted
Python
5
star
23

epgsql_pool

Erlang
4
star
24

SCMReplication

Tools for replicating changes between various SCM.
Python
3
star
25

hooks

Generic events dispatcher
Erlang
2
star
26

teamcity-monitor

Solution for monitoring status of TeamCity builds
JavaScript
2
star
27

aioamqp-ext

Python
2
star
28

aiosqlalchemy_miniorm

Asynchronous SQLAlchemy Object Relational Mapper
Python
2
star
29

sheep

Cowboy protocol and set of utility funs for building JSON/MsgPack APIs.
Erlang
2
star
30

vsptools

Miscellaneous git tools
Python
2
star
31

wds_qt

Qt for Wargaming Distribution team's projects
C++
1
star
32

vspmodules

UE4 modules, plugins and tools
C++
1
star
33

unreal-metrics-logger

Project for logging metrics regarding performance of unreal build/package/cook processes.
C++
1
star