pywebwizard


Namepywebwizard JSON
Version 1.2.63 PyPI version JSON
download
home_pagehttps://gitlab.com/connorlilhomer/pywebwizard
SummaryThe definitive Web Browser Wizard library
upload_time2024-09-20 21:34:12
maintainerConnorLilHomer
docs_urlNone
authorConnorLilHomer
requires_python>=3.8
licenseMIT
keywords web automation browser scraping python selenium headless browsing task data extraction multi-browser support workflow ui testing yaml configuration cross-platform form filling selenium integration dynamic web interactions automated navigation control navegador extracción datos pruebas automatización interacciones sin cabeza automatización de navegadores scrape bot robot web scraping crawler form automation dom manipulation page load automation multi-tab support parallel tasks captcha bypass cookies management session handling proxy support task scheduling ciberseguridad automatización avanzada análisis de datos control remoto de navegadores descarga masiva gestión de sesiones trabajo en paralelo soporte de proxies web crawling extracción avanzada
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <p>
    <a href="#"><img src="https://gitlab.com/parendum/webwizard/-/raw/main/pywebwizard.png" width="456" height="143" alt="pywebwizard logo" /></a>
  </p>
  <p align="center">
    <a href="https://pypi.org/project/pywebwizard/"><img src="https://img.shields.io/pypi/dm/pywebwizard?style=flat-square" alt="pypi"/></a>
    <a href="https://pepy.tech/project/pywebwizard"><img src="https://static.pepy.tech/badge/pywebwizard" alt="Total Downloads" /></a> 
    <a href="https://pypi.org/project/pywebwizard/"><img src="https://img.shields.io/pypi/v/pywebwizard?style=flat-square" /></a>
    <a href="https://gitlab.com/parendum/webwizard/commits/main"><img src="https://img.shields.io/gitlab/last-commit/parendum/webwizard/main?style=flat-square" alt="Last Commit Date"/></a>
    <a href="https://pypi.org/project/pywebwizard/"><img src="https://img.shields.io/pypi/v/pywebwizard?label=last%20release&style=flat-square&logo=pypi" alt="PyPI Last Release Date"/></a>

[//]: # (    <a href="https://pypi.org/project/pywebwizard/"><img src="https://img.shields.io/github/license/parendum/webwizard?style=flat-square" alt="License"/></a>)

[//]: # (    <a href="https://gitlab.com/parendum/webwizard/commits/main"><img src="https://img.shields.io/github/last-commit/parendum/webwizard?style=flat-square" alt="Last Commit"/></a>)

[//]: # (    <a href="https://gitlab.com/parendum/webwizard/pipelines"><img src="https://img.shields.io/gitlab/pipeline-status/parendum/webwizard?branch=main&style=flat-square" alt="GitLab Pipeline"/></a>)

[//]: # (    <a href="https://gitlab.com/parendum/webwizard"><img src="https://img.shields.io/badge/gitlab-repo-blue?style=flat-square" alt="GitLab Repo"/></a>)

[//]: # (    <a href="https://gitlab.com/parendum/webwizard"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen?style=flat-square" alt="Contributions Welcome"/></a>)

[//]: # (    <a href="https://codecov.io/gh/parendum/webwizard"><img src="https://img.shields.io/codecov/c/github/parendum/webwizard?style=flat-square" alt="Code Coverage"/></a>)
  </p>
</div>

# PyWebWizard: Browser Automation

## Table of Contents
- [Description](#description)
- [Features](#features)
- [Requirements](#requirements)
- [Configuration](#configuration)
- [Setup](#setup)
- [Usage](#usage)
  * [Web Elements: Interfaces](#web-elements-interfaces)
  * [Actions with Examples](#actions-with-examples)
  * [Loop Actions and Their Modes](#loop-actions-and-their-modes)
  * [Timeout for Element Selection](#timeout-for-element-selection)
  * [Browser Configuration](#browser-options)
- [Upload project](#upload-project)
  - [Upload to pypi](#upload-to-pypi)
  - [Upload to gitlab](#upload-to-pypi)
- [Contributions](#contributions)
- [License](#license)

## Description

WebWizard is an automation tool that uses Selenium to perform various actions in the browser. Designed with flexibility in mind, WebWizard is driven by a YAML configuration, allowing users to navigate websites, interact with elements, capture screenshots, and much more.

## Features

- **Navigation:** Seamlessly navigate to any provided URL.
- **Interaction:** Fill fields, click on elements, scroll through pages, and simulate keyboard inputs.
- **Screenshot:** Capture the current web page with options to modify element styles before capturing.
- **Loops:** Introduce automation loops either through defined times, local files, or even URLs.
- **Configurable:** Easily customizable through a `config.yaml` file.

## Requirements

- Python 3.x
- Python Packages: `selenium`, `yaml`, `requests`

## Configuration

WebWizard's heart lies in its `config.yaml` file. This configuration file allows you to define various actions (`start`) and some additional settings (`config`).


## Setup

1. Clone or download the repository.
2. Install the required dependencies with `python3 pip install -r requirements.txt`.
3. Modify the `config.yaml` file following the structure and examples provided.
4. Execute the main script: `python main.py`.

## Usage

### Python basic implementation
Single spell
```python
from pywebwizard import PyWebWizard

config_file = "example.yaml"
wizard = PyWebWizard(config_file)
wizard.invoke()
```
Multiple spells
```python
from pywebwizard import PyWebWizard

spell_book = [
  "example1.yaml",
  "example2.yaml",
  "example3.yaml",
]
wizard = PyWebWizard(spell_book)
wizard.invoke()
```
## Web Elements: Interfaces

In WebWizard, interfaces play a crucial role in identifying and interacting with web elements. They provide a way to pinpoint specific elements on a web page. Here are the available interfaces with brief explanations and examples for each:

### 1. `id`

The `id` interface targets elements based on their unique `id` attribute.

```yaml
elements:
  name_field:
    interface: id
    query: name_id
```

### 2. `name`

The `name` interface focuses on elements using their `name` attribute, often used in form fields.

```yaml
elements:
  email_field:
    interface: name
    query: email_name
```

### 3. `xpath`

The `xpath` interface allows for powerful and flexible navigation of the HTML structure.

```yaml
elements:
  message_box:
    interface: xpath
    query: //div/textarea[@name="message"]
```

### 4. `css`

The `css` interface uses CSS selectors to identify elements.

```yaml
elements:
  submit_button:
    interface: css
    query: .submit-btn-class
```

### 5. `class`

The `class` interface locates elements based on their class attribute.

```yaml
elements:
  notification:
    interface: class
    query: notification-class
```

### 6. `tag`

The `tag` interface finds elements based on their HTML tag name.

```yaml
elements:
  all_images:
    interface: tag
    query: img
```

### 7. `link_text`

The `link_text` interface targets anchor tags (`<a>`) using the exact text they display.

```yaml
elements:
  signup_link:
    interface: link_text
    query: Sign Up Now!
```

### 8. `link_text_partial`

The `link_text_partial` interface is similar to `link_text` but matches based on a part of the anchor tag's text.

```yaml
elements:
  partial_link:
    interface: link_text_partial
    query: Sign
```

Each of these interfaces offers a different way to interact with web elements. The choice of interface largely depends on the specific requirements of your automation tasks and the structure of the web page you're working with.

### Actions with Examples

Below are the actions available and a brief example for each:

- **Navigate:** Directs the browser to a specific URL.
  ```yaml
  - action: navigate
    url: https://example.com/
  ```
  
- **Loop:** Automate repetitive tasks using loops. You can loop a fixed number of times, or iterate over local/remote JSON files.
  ```yaml
  - action: loop
    times: 5
    do:
      - action: fill
        interface: id
        query: email
        content: example@email.com
  ```

- **Fill:** Populate fields on the webpage.
  ```yaml
  - action: fill
    <<: *name_field
    content: John Doe
  ```
  
- **Keyboard:** Simulate keyboard presses like 'tab', 'enter', etc. This action keys are the combination on keyboard keys. All keys added to this list are going to be pressed at the same time.
  ```yaml
  - action: keyboard
    keys:
      - "tab"
  ```
  
- **Scroll:** Scroll in the active website tab on x or y axis. At least one of x or y value need to be set.
  ```yaml
  - action: scroll
    x: 0
    y: 200
  ```
  
- **Execute JS:** Execute JavaScript commands in the browser.
  ```yaml
  - action: execute
    js: "$('#name').addClass('example')"
  ```
  
- **Wait for element:** Waits for an element to exist a maximum of time. Default 10 seconds.
  ```yaml
  - action: wait
    interface: id
    query: name
    timeout: 10
  ```
  
- **Screenshot:** Capture the webpage. You can also apply CSS before taking the screenshot like in this example referencing an element by the interface and query and set literally the style you give.
  ```yaml
  - action: screenshot
    file_name: capture
    css:
      - interface: id
        query: email_field
        style: "border: 3px solid blue;"
  ```

## Loop Actions and Their Modes

The `loop` action in WebWizard allows users to automate repetitive tasks. There are three modes available for looping:

### 1. `times`

Iterate a set of actions for a specified number of times. This is useful for performing a repetitive task without the need for external data.

```yaml
- action: loop
  times: 5
  do:
    - action: fill
      interface: id
      query: email
      content: example@email.com
```

### 2. `source` (Local JSON File)

Use a local JSON file as a source for looping. Each entry in the JSON file can be used for each iteration. The `do__key` format allows you to pull data from the JSON's keys for each iteration.

```yaml
- action: loop
  source: F:\PARENDUM\Software\autobrowser\data.json
  do:
    - action: fill
      interface: id
      query: name_field
      content: do__name
```

### 3. `source` (URL)

Similar to the local JSON file mode, but this time the source is a remote URL which returns a JSON. The same `do__key` format applies here.

```yaml
- action: loop
  source: http://example.com/data.json
  do:
    - action: fill
      interface: id
      query: name_field
      content: do__name
```

### 3. `raw` (URL)

This raw could be a JSON string. The same `do__key` format applies here.

```yaml
- action: loop
  raw: "{'name': 'Kevin'}"
  do:
    - action: fill
      interface: id
      query: name_field
      content: do__name
```

Using the `do__key` format, you can dynamically pull data from your JSON (whether local or from a URL) and use it in your actions. This provides a powerful way to automate tasks with varying data.

### Timeout for Element Selection

In scenarios where WebWizard tries to interact with an element that may not be immediately available, a `timeout` feature is available to avoid abrupt errors or exceptions. By default, WebWizard will wait for up to 10 seconds for an element to become available before throwing an exception. This is particularly useful in situations where the webpage might take some time to load all its elements, especially in cases of heavy JavaScript usage or slow network speeds.

You can specify the `timeout` parameter alongside the `interface` and `query` in your element selection configuration. Here's how you can do it:

```yaml
elements:
  dynamic_content:
    interface: id
    query: name
    timeout: 15  # Wait up to 15 seconds for the element
```

In the example above, WebWizard waits for up to 15 seconds for an element with the specified ID to appear. If the element doesn't become available within this time, an exception will be thrown, and you'll be informed of the timeout incident, allowing you to handle these cases gracefully in your automation script.

Remember, while the default wait time is 10 seconds, you can adjust the `timeout` to any number of seconds that suits your needs, depending on the expected behavior of the web pages you are interacting with.

---
## Upload project

### Automatic upload:

```shell
./upload.ps1
```

### Manual upload:
```shell
# Execute the script to update the version
python .\tools.py

# Call the all the upload scripts
.\upload_to_gitlab.ps1
.\upload_to_pypi.ps1

```

---
## Upload to pypi

### Automatic upload:
```shell
./upload_to_pypi.ps1
```
### Manual upload:
```shell
python setup.py sdist bdist_wheel
python -m twine upload dist/*
```

---
## Upload to gitlab
```shell
./upload_to_gitlab.ps1
```
### Manual upload:
```shell
git add .
git commit -m "Project update"
git push
```


### Browser Configuratioin

Choose from supported browsers:
```yaml
config: 
  - browser: firefox  # firefox, chrome, ...
```

Choose hidden or not:
```yaml
config: 
  - hidden: true
```

Choose destroy or not web browser when finishing:
```yaml
config: 
  - destroy: true
```

Choose screenshots directory:
```yaml
config: 
  - screenshots: C:\images
```

(Optional) Your remote selenium docker image URL:
```yaml
config: 
  - remote: https://my-remote-instance.company.com/
```

## Contributors

## Contributions

Your contributions enrich the WebWizard community! Whether it's a bug report, feature suggestion, or a code contribution, all are appreciated. For contributions, please submit a Pull Request.

## License

WebWizard is licensed under the MIT License. For a comprehensive understanding, refer to the LICENSE file.

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/connorlilhomer/pywebwizard",
    "name": "pywebwizard",
    "maintainer": "ConnorLilHomer",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "info@parendum.com",
    "keywords": "web, automation, browser, scraping, python, selenium, headless, browsing, task, data, extraction, multi-browser, support, workflow, UI, testing, YAML, configuration, cross-platform, form, filling, Selenium, integration, dynamic, web, interactions, automated, navigation, control, navegador, extracci\u00f3n, datos, pruebas, automatizaci\u00f3n, interacciones, sin, cabeza, automatizaci\u00f3n de navegadores, scrape, bot, robot, web scraping, crawler, form automation, dom manipulation, page load automation, multi-tab support, parallel tasks, captcha bypass, cookies management, session handling, proxy support, task scheduling, ciberseguridad, automatizaci\u00f3n avanzada, an\u00e1lisis de datos, control remoto de navegadores, descarga masiva, gesti\u00f3n de sesiones, trabajo en paralelo, soporte de proxies, web crawling, extracci\u00f3n avanzada",
    "author": "ConnorLilHomer",
    "author_email": "info@parendum.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/b7/048fd4f782fcdac6c4e2cf29b4430e8e46d4a20f0b80764c6ef20499980a/pywebwizard-1.2.63.tar.gz",
    "platform": "Windows",
    "description": "<div align=\"center\">\r\n  <p>\r\n    <a href=\"#\"><img src=\"https://gitlab.com/parendum/webwizard/-/raw/main/pywebwizard.png\" width=\"456\" height=\"143\" alt=\"pywebwizard logo\" /></a>\r\n  </p>\r\n  <p align=\"center\">\r\n    <a href=\"https://pypi.org/project/pywebwizard/\"><img src=\"https://img.shields.io/pypi/dm/pywebwizard?style=flat-square\" alt=\"pypi\"/></a>\r\n    <a href=\"https://pepy.tech/project/pywebwizard\"><img src=\"https://static.pepy.tech/badge/pywebwizard\" alt=\"Total Downloads\" /></a> \r\n    <a href=\"https://pypi.org/project/pywebwizard/\"><img src=\"https://img.shields.io/pypi/v/pywebwizard?style=flat-square\" /></a>\r\n    <a href=\"https://gitlab.com/parendum/webwizard/commits/main\"><img src=\"https://img.shields.io/gitlab/last-commit/parendum/webwizard/main?style=flat-square\" alt=\"Last Commit Date\"/></a>\r\n    <a href=\"https://pypi.org/project/pywebwizard/\"><img src=\"https://img.shields.io/pypi/v/pywebwizard?label=last%20release&style=flat-square&logo=pypi\" alt=\"PyPI Last Release Date\"/></a>\r\n\r\n[//]: # (    <a href=\"https://pypi.org/project/pywebwizard/\"><img src=\"https://img.shields.io/github/license/parendum/webwizard?style=flat-square\" alt=\"License\"/></a>)\r\n\r\n[//]: # (    <a href=\"https://gitlab.com/parendum/webwizard/commits/main\"><img src=\"https://img.shields.io/github/last-commit/parendum/webwizard?style=flat-square\" alt=\"Last Commit\"/></a>)\r\n\r\n[//]: # (    <a href=\"https://gitlab.com/parendum/webwizard/pipelines\"><img src=\"https://img.shields.io/gitlab/pipeline-status/parendum/webwizard?branch=main&style=flat-square\" alt=\"GitLab Pipeline\"/></a>)\r\n\r\n[//]: # (    <a href=\"https://gitlab.com/parendum/webwizard\"><img src=\"https://img.shields.io/badge/gitlab-repo-blue?style=flat-square\" alt=\"GitLab Repo\"/></a>)\r\n\r\n[//]: # (    <a href=\"https://gitlab.com/parendum/webwizard\"><img src=\"https://img.shields.io/badge/contributions-welcome-brightgreen?style=flat-square\" alt=\"Contributions Welcome\"/></a>)\r\n\r\n[//]: # (    <a href=\"https://codecov.io/gh/parendum/webwizard\"><img src=\"https://img.shields.io/codecov/c/github/parendum/webwizard?style=flat-square\" alt=\"Code Coverage\"/></a>)\r\n  </p>\r\n</div>\r\n\r\n# PyWebWizard: Browser Automation\r\n\r\n## Table of Contents\r\n- [Description](#description)\r\n- [Features](#features)\r\n- [Requirements](#requirements)\r\n- [Configuration](#configuration)\r\n- [Setup](#setup)\r\n- [Usage](#usage)\r\n  * [Web Elements: Interfaces](#web-elements-interfaces)\r\n  * [Actions with Examples](#actions-with-examples)\r\n  * [Loop Actions and Their Modes](#loop-actions-and-their-modes)\r\n  * [Timeout for Element Selection](#timeout-for-element-selection)\r\n  * [Browser Configuration](#browser-options)\r\n- [Upload project](#upload-project)\r\n  - [Upload to pypi](#upload-to-pypi)\r\n  - [Upload to gitlab](#upload-to-pypi)\r\n- [Contributions](#contributions)\r\n- [License](#license)\r\n\r\n## Description\r\n\r\nWebWizard is an automation tool that uses Selenium to perform various actions in the browser. Designed with flexibility in mind, WebWizard is driven by a YAML configuration, allowing users to navigate websites, interact with elements, capture screenshots, and much more.\r\n\r\n## Features\r\n\r\n- **Navigation:** Seamlessly navigate to any provided URL.\r\n- **Interaction:** Fill fields, click on elements, scroll through pages, and simulate keyboard inputs.\r\n- **Screenshot:** Capture the current web page with options to modify element styles before capturing.\r\n- **Loops:** Introduce automation loops either through defined times, local files, or even URLs.\r\n- **Configurable:** Easily customizable through a `config.yaml` file.\r\n\r\n## Requirements\r\n\r\n- Python 3.x\r\n- Python Packages: `selenium`, `yaml`, `requests`\r\n\r\n## Configuration\r\n\r\nWebWizard's heart lies in its `config.yaml` file. This configuration file allows you to define various actions (`start`) and some additional settings (`config`).\r\n\r\n\r\n## Setup\r\n\r\n1. Clone or download the repository.\r\n2. Install the required dependencies with `python3 pip install -r requirements.txt`.\r\n3. Modify the `config.yaml` file following the structure and examples provided.\r\n4. Execute the main script: `python main.py`.\r\n\r\n## Usage\r\n\r\n### Python basic implementation\r\nSingle spell\r\n```python\r\nfrom pywebwizard import PyWebWizard\r\n\r\nconfig_file = \"example.yaml\"\r\nwizard = PyWebWizard(config_file)\r\nwizard.invoke()\r\n```\r\nMultiple spells\r\n```python\r\nfrom pywebwizard import PyWebWizard\r\n\r\nspell_book = [\r\n  \"example1.yaml\",\r\n  \"example2.yaml\",\r\n  \"example3.yaml\",\r\n]\r\nwizard = PyWebWizard(spell_book)\r\nwizard.invoke()\r\n```\r\n## Web Elements: Interfaces\r\n\r\nIn WebWizard, interfaces play a crucial role in identifying and interacting with web elements. They provide a way to pinpoint specific elements on a web page. Here are the available interfaces with brief explanations and examples for each:\r\n\r\n### 1. `id`\r\n\r\nThe `id` interface targets elements based on their unique `id` attribute.\r\n\r\n```yaml\r\nelements:\r\n  name_field:\r\n    interface: id\r\n    query: name_id\r\n```\r\n\r\n### 2. `name`\r\n\r\nThe `name` interface focuses on elements using their `name` attribute, often used in form fields.\r\n\r\n```yaml\r\nelements:\r\n  email_field:\r\n    interface: name\r\n    query: email_name\r\n```\r\n\r\n### 3. `xpath`\r\n\r\nThe `xpath` interface allows for powerful and flexible navigation of the HTML structure.\r\n\r\n```yaml\r\nelements:\r\n  message_box:\r\n    interface: xpath\r\n    query: //div/textarea[@name=\"message\"]\r\n```\r\n\r\n### 4. `css`\r\n\r\nThe `css` interface uses CSS selectors to identify elements.\r\n\r\n```yaml\r\nelements:\r\n  submit_button:\r\n    interface: css\r\n    query: .submit-btn-class\r\n```\r\n\r\n### 5. `class`\r\n\r\nThe `class` interface locates elements based on their class attribute.\r\n\r\n```yaml\r\nelements:\r\n  notification:\r\n    interface: class\r\n    query: notification-class\r\n```\r\n\r\n### 6. `tag`\r\n\r\nThe `tag` interface finds elements based on their HTML tag name.\r\n\r\n```yaml\r\nelements:\r\n  all_images:\r\n    interface: tag\r\n    query: img\r\n```\r\n\r\n### 7. `link_text`\r\n\r\nThe `link_text` interface targets anchor tags (`<a>`) using the exact text they display.\r\n\r\n```yaml\r\nelements:\r\n  signup_link:\r\n    interface: link_text\r\n    query: Sign Up Now!\r\n```\r\n\r\n### 8. `link_text_partial`\r\n\r\nThe `link_text_partial` interface is similar to `link_text` but matches based on a part of the anchor tag's text.\r\n\r\n```yaml\r\nelements:\r\n  partial_link:\r\n    interface: link_text_partial\r\n    query: Sign\r\n```\r\n\r\nEach of these interfaces offers a different way to interact with web elements. The choice of interface largely depends on the specific requirements of your automation tasks and the structure of the web page you're working with.\r\n\r\n### Actions with Examples\r\n\r\nBelow are the actions available and a brief example for each:\r\n\r\n- **Navigate:** Directs the browser to a specific URL.\r\n  ```yaml\r\n  - action: navigate\r\n    url: https://example.com/\r\n  ```\r\n  \r\n- **Loop:** Automate repetitive tasks using loops. You can loop a fixed number of times, or iterate over local/remote JSON files.\r\n  ```yaml\r\n  - action: loop\r\n    times: 5\r\n    do:\r\n      - action: fill\r\n        interface: id\r\n        query: email\r\n        content: example@email.com\r\n  ```\r\n\r\n- **Fill:** Populate fields on the webpage.\r\n  ```yaml\r\n  - action: fill\r\n    <<: *name_field\r\n    content: John Doe\r\n  ```\r\n  \r\n- **Keyboard:** Simulate keyboard presses like 'tab', 'enter', etc. This action keys are the combination on keyboard keys. All keys added to this list are going to be pressed at the same time.\r\n  ```yaml\r\n  - action: keyboard\r\n    keys:\r\n      - \"tab\"\r\n  ```\r\n  \r\n- **Scroll:** Scroll in the active website tab on x or y axis. At least one of x or y value need to be set.\r\n  ```yaml\r\n  - action: scroll\r\n    x: 0\r\n    y: 200\r\n  ```\r\n  \r\n- **Execute JS:** Execute JavaScript commands in the browser.\r\n  ```yaml\r\n  - action: execute\r\n    js: \"$('#name').addClass('example')\"\r\n  ```\r\n  \r\n- **Wait for element:** Waits for an element to exist a maximum of time. Default 10 seconds.\r\n  ```yaml\r\n  - action: wait\r\n    interface: id\r\n    query: name\r\n    timeout: 10\r\n  ```\r\n  \r\n- **Screenshot:** Capture the webpage. You can also apply CSS before taking the screenshot like in this example referencing an element by the interface and query and set literally the style you give.\r\n  ```yaml\r\n  - action: screenshot\r\n    file_name: capture\r\n    css:\r\n      - interface: id\r\n        query: email_field\r\n        style: \"border: 3px solid blue;\"\r\n  ```\r\n\r\n## Loop Actions and Their Modes\r\n\r\nThe `loop` action in WebWizard allows users to automate repetitive tasks. There are three modes available for looping:\r\n\r\n### 1. `times`\r\n\r\nIterate a set of actions for a specified number of times. This is useful for performing a repetitive task without the need for external data.\r\n\r\n```yaml\r\n- action: loop\r\n  times: 5\r\n  do:\r\n    - action: fill\r\n      interface: id\r\n      query: email\r\n      content: example@email.com\r\n```\r\n\r\n### 2. `source` (Local JSON File)\r\n\r\nUse a local JSON file as a source for looping. Each entry in the JSON file can be used for each iteration. The `do__key` format allows you to pull data from the JSON's keys for each iteration.\r\n\r\n```yaml\r\n- action: loop\r\n  source: F:\\PARENDUM\\Software\\autobrowser\\data.json\r\n  do:\r\n    - action: fill\r\n      interface: id\r\n      query: name_field\r\n      content: do__name\r\n```\r\n\r\n### 3. `source` (URL)\r\n\r\nSimilar to the local JSON file mode, but this time the source is a remote URL which returns a JSON. The same `do__key` format applies here.\r\n\r\n```yaml\r\n- action: loop\r\n  source: http://example.com/data.json\r\n  do:\r\n    - action: fill\r\n      interface: id\r\n      query: name_field\r\n      content: do__name\r\n```\r\n\r\n### 3. `raw` (URL)\r\n\r\nThis raw could be a JSON string. The same `do__key` format applies here.\r\n\r\n```yaml\r\n- action: loop\r\n  raw: \"{'name': 'Kevin'}\"\r\n  do:\r\n    - action: fill\r\n      interface: id\r\n      query: name_field\r\n      content: do__name\r\n```\r\n\r\nUsing the `do__key` format, you can dynamically pull data from your JSON (whether local or from a URL) and use it in your actions. This provides a powerful way to automate tasks with varying data.\r\n\r\n### Timeout for Element Selection\r\n\r\nIn scenarios where WebWizard tries to interact with an element that may not be immediately available, a `timeout` feature is available to avoid abrupt errors or exceptions. By default, WebWizard will wait for up to 10 seconds for an element to become available before throwing an exception. This is particularly useful in situations where the webpage might take some time to load all its elements, especially in cases of heavy JavaScript usage or slow network speeds.\r\n\r\nYou can specify the `timeout` parameter alongside the `interface` and `query` in your element selection configuration. Here's how you can do it:\r\n\r\n```yaml\r\nelements:\r\n  dynamic_content:\r\n    interface: id\r\n    query: name\r\n    timeout: 15  # Wait up to 15 seconds for the element\r\n```\r\n\r\nIn the example above, WebWizard waits for up to 15 seconds for an element with the specified ID to appear. If the element doesn't become available within this time, an exception will be thrown, and you'll be informed of the timeout incident, allowing you to handle these cases gracefully in your automation script.\r\n\r\nRemember, while the default wait time is 10 seconds, you can adjust the `timeout` to any number of seconds that suits your needs, depending on the expected behavior of the web pages you are interacting with.\r\n\r\n---\r\n## Upload project\r\n\r\n### Automatic upload:\r\n\r\n```shell\r\n./upload.ps1\r\n```\r\n\r\n### Manual upload:\r\n```shell\r\n# Execute the script to update the version\r\npython .\\tools.py\r\n\r\n# Call the all the upload scripts\r\n.\\upload_to_gitlab.ps1\r\n.\\upload_to_pypi.ps1\r\n\r\n```\r\n\r\n---\r\n## Upload to pypi\r\n\r\n### Automatic upload:\r\n```shell\r\n./upload_to_pypi.ps1\r\n```\r\n### Manual upload:\r\n```shell\r\npython setup.py sdist bdist_wheel\r\npython -m twine upload dist/*\r\n```\r\n\r\n---\r\n## Upload to gitlab\r\n```shell\r\n./upload_to_gitlab.ps1\r\n```\r\n### Manual upload:\r\n```shell\r\ngit add .\r\ngit commit -m \"Project update\"\r\ngit push\r\n```\r\n\r\n\r\n### Browser Configuratioin\r\n\r\nChoose from supported browsers:\r\n```yaml\r\nconfig: \r\n  - browser: firefox  # firefox, chrome, ...\r\n```\r\n\r\nChoose hidden or not:\r\n```yaml\r\nconfig: \r\n  - hidden: true\r\n```\r\n\r\nChoose destroy or not web browser when finishing:\r\n```yaml\r\nconfig: \r\n  - destroy: true\r\n```\r\n\r\nChoose screenshots directory:\r\n```yaml\r\nconfig: \r\n  - screenshots: C:\\images\r\n```\r\n\r\n(Optional) Your remote selenium docker image URL:\r\n```yaml\r\nconfig: \r\n  - remote: https://my-remote-instance.company.com/\r\n```\r\n\r\n## Contributors\r\n\r\n## Contributions\r\n\r\nYour contributions enrich the WebWizard community! Whether it's a bug report, feature suggestion, or a code contribution, all are appreciated. For contributions, please submit a Pull Request.\r\n\r\n## License\r\n\r\nWebWizard is licensed under the MIT License. For a comprehensive understanding, refer to the LICENSE file.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The definitive Web Browser Wizard library",
    "version": "1.2.63",
    "project_urls": {
        "Download": "https://gitlab.com/connorlilhomer/pywebwizard/-/archive/main/webwizard-1.2.63.tar.gz",
        "Homepage": "https://gitlab.com/connorlilhomer/pywebwizard"
    },
    "split_keywords": [
        "web",
        " automation",
        " browser",
        " scraping",
        " python",
        " selenium",
        " headless",
        " browsing",
        " task",
        " data",
        " extraction",
        " multi-browser",
        " support",
        " workflow",
        " ui",
        " testing",
        " yaml",
        " configuration",
        " cross-platform",
        " form",
        " filling",
        " selenium",
        " integration",
        " dynamic",
        " web",
        " interactions",
        " automated",
        " navigation",
        " control",
        " navegador",
        " extracci\u00f3n",
        " datos",
        " pruebas",
        " automatizaci\u00f3n",
        " interacciones",
        " sin",
        " cabeza",
        " automatizaci\u00f3n de navegadores",
        " scrape",
        " bot",
        " robot",
        " web scraping",
        " crawler",
        " form automation",
        " dom manipulation",
        " page load automation",
        " multi-tab support",
        " parallel tasks",
        " captcha bypass",
        " cookies management",
        " session handling",
        " proxy support",
        " task scheduling",
        " ciberseguridad",
        " automatizaci\u00f3n avanzada",
        " an\u00e1lisis de datos",
        " control remoto de navegadores",
        " descarga masiva",
        " gesti\u00f3n de sesiones",
        " trabajo en paralelo",
        " soporte de proxies",
        " web crawling",
        " extracci\u00f3n avanzada"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6d25d944eb466e14806a58b94fb40beedaedcf09c245f4d0034ee49ee57af18",
                "md5": "df9b52ccdcfb3da586cba90ef0ff46d6",
                "sha256": "ffea214173130ae504831ab9c76c684211ff1aa8c8320d350fa4365998362756"
            },
            "downloads": -1,
            "filename": "pywebwizard-1.2.63-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df9b52ccdcfb3da586cba90ef0ff46d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17086,
            "upload_time": "2024-09-20T21:34:10",
            "upload_time_iso_8601": "2024-09-20T21:34:10.768376Z",
            "url": "https://files.pythonhosted.org/packages/e6/d2/5d944eb466e14806a58b94fb40beedaedcf09c245f4d0034ee49ee57af18/pywebwizard-1.2.63-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cb7048fd4f782fcdac6c4e2cf29b4430e8e46d4a20f0b80764c6ef20499980a",
                "md5": "eca99cb4f72f3e8ad82fdf64f1d00fa9",
                "sha256": "a8dd9dcb204b9d5030a3068c2de47439b933c59a280a3eb95d2e071719383e71"
            },
            "downloads": -1,
            "filename": "pywebwizard-1.2.63.tar.gz",
            "has_sig": false,
            "md5_digest": "eca99cb4f72f3e8ad82fdf64f1d00fa9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 21442,
            "upload_time": "2024-09-20T21:34:12",
            "upload_time_iso_8601": "2024-09-20T21:34:12.313506Z",
            "url": "https://files.pythonhosted.org/packages/8c/b7/048fd4f782fcdac6c4e2cf29b4430e8e46d4a20f0b80764c6ef20499980a/pywebwizard-1.2.63.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-20 21:34:12",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "connorlilhomer",
    "gitlab_project": "pywebwizard",
    "lcname": "pywebwizard"
}
        
Elapsed time: 2.82950s