Code Monkey home page Code Monkey logo

Comments (4)

ojii avatar ojii commented on May 14, 2024 1

The split between driver/session which leads to a kind of low level API was initially done because I (wrongly) assumed you could have multiple sessions per driver. At least for Geckodriver that seems to not be the case, so I'm considering adding a higher level "just give me a browser session" API that combines the two.

from arsenic.

tarekziade avatar tarekziade commented on May 14, 2024

Here's a working example

https://github.com/tarekziade/molosonic/blob/master/loadtest.py

notice that I had to hack around the context manager. It's nice to have context managers, but I think it should not be mandatory to use the classes.

I like how aiohttp does it. e.g. you can use the Session objects in regular code by initializing it and closing it manually, or if you want you can use the context manager so it does that for you.

from arsenic.

tarekziade avatar tarekziade commented on May 14, 2024

Turned out it was my lack of understanding of the implementation. After more work, I was able to use it without context manager. Sorry ;)

https://github.com/tarekziade/molosonic/blob/master/loadtest.py#L23-L53

The Firefox class I have implemented would be the high level API I was talking about

from arsenic.

ojii avatar ojii commented on May 14, 2024

api has changed to higher level, closing this.

from arsenic.

Related Issues (20)

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.