Coder Social home page Coder Social logo

selenoid-ggr-example's Introduction

Selenoid ggr example

In this repository you will get a docker-compose.yml with selenoid, selenoid-ui, ggr, ggr-ui and a python execution example.

The pourpuse of this example it to check the architecture configuration to deploy a decouple Selenium cluster with the previews tools.

Also is needed to validate the posibilitiy to reconect to a previews existing session from outside script, this can be found on the script outside-reconnect-session.py

To run the example just run docker-compuse up on root directory.

Reconnection example

Host requeriments:

  • python3
  • Install Selenium with pip install selenium

For the reconnection script you need to get the session previewsly created for the service python-screaper-example.py, when you run docker compuse you will see a log like this:

python-scraper-example_1  | 2022/12/07 15:58:23 - Creating connection to the hub
python-scraper-example_1  | 2022/12/07 15:58:24 - Print driver URL and session ID
python-scraper-example_1  | driver.command_executor._url: http://test:test-password@ggr:4444/wd/hub
python-scraper-example_1  | driver.session_id: 1f8ac2fbb819fa8bd83b9d15bf3796b81f03bae775fef77c639c3d314256e8da
python-scraper-example_1  | 2022/12/07 15:58:24 - Open page on session
python-scraper-example_1  | 2022/12/07 15:58:28 - Get element from page
python-scraper-example_1  | 2022/12/07 15:59:08 - The element capture show: HTML Tutorial

Get the session ID from driver.session_id and past it on COPY_SESSION_RECONECT_HERE in outside-reconnect-session.py

This example is based on this articles

selenoid-ggr-example's People

Contributors

matiasf avatar

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.