How to use the arsenic.engines.tornado.Tornado function in arsenic

To help you get started, we’ve selected a few arsenic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDE / arsenic / tests / test_tornado.py View on Github external
async def test_simple_form_submit(base_url, service, http_server):
    async with service.driver.run(Tornado) as driver:
        async with driver.session(service.browser) as session:
            await session.get(f'{base_url}/html/')
            field = await session.get_element('input[name="field"]')
            await field.send_keys('sample input')
            submit = await session.get_element('input[type="submit"]')
            await submit.click()
            assert 'sample input' in await session.get_page_source()
github HDE / arsenic / tests / test_tornado.py View on Github external
async def test_get_page_source(base_url, service, http_server):
    async with service.driver.run(Tornado) as driver:
        async with driver.session(service.browser) as session:
            await session.get(f'{base_url}/')
            assert 'Hello Tornado!' in await session.get_page_source()
github HDE / arsenic / tests / infra / engines.py View on Github external
@attr.s
class EngineContext:
    start_loop = attr.ib()
    engine = attr.ib()
    name = attr.ib()


ENGINE_CONTEXTS = [
    EngineContext(
        start_loop=start_aiohttp_loop,
        engine=Aiohttp,
        name='aiohttp'
    ),
    EngineContext(
        start_loop=start_tornado_loop,
        engine=Tornado,
        name='tornado'
    )
github HDE / arsenic / examples / tornado_example.py View on Github external
async def remote(func):
    await func(
        Remote(
            'http://hub.browserstack.com/wd/hub',
            BasicAuth(
                os.environ['USERNAME'],
                os.environ['PASSWORD'],
            )
        ),
        Tornado
    )
github HDE / arsenic / examples / tornado_example.py View on Github external
async def gecko(func):
    await func(
        Geckodriver(),
        Tornado
    )