Git Product home page Git Product logo

sylenium's Introduction

.github/banner.png

Overview ๐ŸŽ

docs: Documentation Status
tests:
Travis-CI Build Status Coverage Status
package:
infra:

What is Sylenium? ๐ŸŽ

The goal of sylenium is to create a test framework agnostic browser (selenium wrapper) automation library to help development teams write end to end tests for their web applications without all the necessary boilerplate that is required to achieve stability with selenium.

Official Documentation ๐ŸŽ

https://sylenium.readthedocs.io/

Configuring Sylenium ๐ŸŽ

Sylenium uses a smart default configuration for most use cases, however the customisation options are endless. Managing the 'global' configuration can be achieved as outlined below:

from sylenium import Configuration
from sylenium import configure
configure(Configuration(headless=False, remote=True, explicit_waiting=15.00))
# Now all drivers will use this 'global configuration'
go("https://www.google.com")

On the fly per driver configurations?

with get_driver(Configuration(headless=True, polling_interval=2.50, default_selector='ID')):
    go('https://www.google.com')

Quick Start ๐ŸŽ

Here is a simple way to get going for a standalone simple library script that requires some browser interaction:

import sylenium import *

def main():
    # google search => No setup at all, just install sylenium with pip
    with get_driver():
        go("https://www.bing.com")
        find(ById("sb_form_q")).set_text("Hello World").clear().set_text("My Search").press_enter()
        find(ById("b_results")).should_be(Visible).should_contain(Text("My Search"))

Sylenium-pytest ๐ŸŽ

Plugin (coming soon)

sylenium's People

Contributors

symonk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

sylenium's Issues

Implement a configuration sub module

  • How should the config be loaded in dynamically?
  • Should the library force the client to acknowledge loading before using it, via browzer.initiate() etc?
  • Decouple the config, it should do only config and do it well
  • How to handle dynamically loaded options like a EventListener for example
  • Do not acquire a binary if required during configuration stage
  • More / widen the options? - Hard to gauge without other parts of the libraries needs

Driver management and thread local drivers?

We need to implement the following 'high level design':

  • calling open(url) should (if not already yield a new driver)
  • how do we manage driver tracker if someone closes one, we need some sort of callback to untrack the driver for that thread?
  • what about the config, its essentially fully 'global' then via open() calls, how do we test that if so?
  • current concept of sessions, is it fit for purpose?

-- Brain Dump

  • Can threading.local help?
  • Can we have a secondary thread for each browser, that is responsible for checking if the browser is destroyed?
  • Can we proxy .quit() / .close() to remove the browser from tracking?
  • What happens if a thread runs multiple tests, how do we create a fresh browser there?
  • Can observer pattern help? (what does that look like in python) for observing some sort of driver or session and notifying

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.