Giter Club home page Giter Club logo

ubertidavide / cookiecutter-fastbots Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 37 KB

A project template ready to use, tailored for effortless utilization in crafting web automated bots or scrapers, leveraging the fastbots library.

Home Page: https://github.com/ubertidavide/fastbots

License: Apache License 2.0

Python 91.28% Dockerfile 1.91% Batchfile 3.43% Shell 3.39%
fastbots bot docker ready-to-use scraper selenium template web-automation page-object-model pom python

cookiecutter-fastbots's Introduction

cookiecutter-fastbots

A project template ready to use, tailored for effortless utilization in crafting web automated bots or scrapers, leveraging the fastbots library.

Usage

Install cookiecutter and generate the project from this template.

# Install Cookiecutter (if not already installed)
pip install cookiecutter

# Use Cookiecutter to generate a project using this template
cookiecutter gh:ubertidavide/cookiecutter-fastbots

For more details on the cookiecutter usage see it's documentation.

Standard Usage

To run the project using the standard approach, follow these steps:

Install Dependencies

Ensure Poetry is installed on your system. If not, you can install it by following the instructions on the official Poetry installation page.

Install the project dependencies using Poetry. Navigate to the root folder of the project and run:

poetry install

Configure Browser

Ensure that you have the desired web browser installed on your system.

Run the Project

After installing the dependencies and configuring the browser:

Run the main.py script from the root folder of the project:

    cd {{cookiecutter.project_name}}
    ./scripts/run.sh or ./scripts/run.bat (linux or windows)

This script will execute the automation tasks specified in the main.py file.

Debugging

From VSCode first run the below script and then Run -> Start Debugging (F5 Hotkey).

    cd {{cookiecutter.project_name}}
    ./scripts/debug.sh or ./scripts/debug.bat (linux or windows)

Dockerized

If you prefer to run the project using Docker:

Ensure that Docker is installed on your machine.

The entrypoint main.py is required in the root of the project.

Run the following command to start the project using Docker Compose:

docker-compose up

This command will build the Docker image and start the containerized environment.

Please note that the Dockerized approach provides a self-contained environment with all dependencies pre-configured, making it easy to run the project consistently across different systems.

Structure

The Cookiecutter template follows a specific structure to organize various components of your project:

  • /core: This folder contains all the custom global configs declared for all the project, loaded from the settings.ini.

  • /pages: This folder contains all the Page models. Pages are likely representations of web pages or components in your application.

  • /tasks: In this folder, you'll find all the available Task modules. Tasks represent the specific actions or functionalities that your automation framework can perform.

  • main.py: This is the main entry point for your project. It calls the task that needs to be executed, serving as the starting point for your automation workflow.

  • locators.ini: This file holds all the settings related to locators. Locators are typically used to identify and interact with elements on web pages.

  • settings.ini: The settings file contains configuration parameters and options for your automation framework. Users can customize these settings based on their specific requirements.

  • preferences.json: This JSON file includes all the driver's preferences. It could store preferences for the web driver, such as browser options or other settings.

Additional Information

For more detailed documentation and information about using this automation library, please refer to the fastbots official documentation. The library documentation will provide further guidance on how to leverage the features and capabilities of the framework.

cookiecutter-fastbots's People

Contributors

ubertidavide avatar

Stargazers

 avatar

Watchers

 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.