How to use the arsenic.engines.aiohttp.Aiohttp 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_aiohttp.py View on Github external
async def test_simple_form_submit(app_port, service):
    async with service.driver.run(Aiohttp) as driver:
        async with driver.session(service.browser) as session:
            await session.get(f'http://127.0.0.1:{app_port}/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_aiohttp.py View on Github external
async def test_get_page_source(app_port, service):
    async with service.driver.run(Aiohttp) as driver:
        async with driver.session(service.browser) as session:
            await session.get(f'http://127.0.0.1:{app_port}/')
            assert 'Hello Aiohttp!' in await session.get_page_source()
github HDE / arsenic / tests / infra / engines.py View on Github external
run,
        stop
    )


@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 / aiohttp_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'],
            )
        ),
        Aiohttp
    )
github HDE / arsenic / examples / aiohttp_example.py View on Github external
async def gecko(func):
    await func(
        Geckodriver(),
        Aiohttp
    )