How to use the arsenic.browsers 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 / plugins / infra / plugin.py View on Github external
def browser(web_app, request):
    browser = get_instance(os.environ['ARSENIC_BROWSER'], browsers)
    if os.environ.get('BROWSERSTACK_LOCAL_IDENTIFIER', None):
        if not os.environ.get('BROWSERSTACK_API_KEY', False):
            raise pytest.skip('BROWSERSTACK_API_KEY not set')
        browser.capabilities['name'] = request.node.name
    return browser
github HDE / arsenic / docs / tutorials / helloworld.py View on Github external
async def hello_world():
    service = services.Geckodriver(binary=GECKODRIVER)
    browser = browsers.Firefox()
    async with get_session(service, browser) as session:
        await session.get("https://images.google.com/")
        search_box = await session.wait_for_element(5, "input[name=q]")
        await search_box.send_keys("Cats")
        await search_box.send_keys(keys.ENTER)
        await asyncio.sleep(10)
github HDE / arsenic / docs / howto / action_chains.py View on Github external
async def wrapper():
        gecko = services.Geckodriver()
        ff = browsers.Firefox()
        async with RunApp() as base_url, get_session(gecko, ff, base_url) as session:
            return await coro(session)