{"id":23213441,"url":"https://github.com/nagipragalathan/webtorch","last_synced_at":"2026-05-05T07:31:22.727Z","repository":{"id":192348995,"uuid":"686543281","full_name":"NagiPragalathan/WebTorch","owner":"NagiPragalathan","description":"LCTP is a Selenium-based Low-Code Web Testing Automation tool in Python. It simplifies web testing using JSON configuration files, making it easy for testers and developers to automate test scenarios.","archived":false,"fork":false,"pushed_at":"2023-09-03T08:05:56.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T13:15:10.514Z","etag":null,"topics":["lctp","lowcode","modules","python","requirements","selenium","web-testing","web-testing-automation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/WebTorchX/0.0.1/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NagiPragalathan.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-03T06:22:13.000Z","updated_at":"2023-10-04T08:19:54.000Z","dependencies_parsed_at":"2023-09-04T11:08:20.014Z","dependency_job_id":null,"html_url":"https://github.com/NagiPragalathan/WebTorch","commit_stats":null,"previous_names":["nagipragalathan/webtorch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NagiPragalathan/WebTorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FWebTorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FWebTorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FWebTorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FWebTorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NagiPragalathan","download_url":"https://codeload.github.com/NagiPragalathan/WebTorch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FWebTorch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lctp","lowcode","modules","python","requirements","selenium","web-testing","web-testing-automation"],"created_at":"2024-12-18T19:17:36.252Z","updated_at":"2026-05-05T07:31:22.703Z","avatar_url":"https://github.com/NagiPragalathan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://106714.fs1.hubspotusercontent-na1.net/hubfs/106714/Low%20Code%20Citizen%20Developer.jpg\" height=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003e\n     WebTorch ( LCTP ) - Selenium Low-Code Web Testing Automation in Python\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n![GitHub](https://img.shields.io/github/license/NagiPragalathan/WebTorch?style=flat-square\u0026logo=github)\n![GitHub contributors](https://img.shields.io/github/contributors/NagiPragalathan/WebTorch?logo=github\u0026style=flat-square)\n![GitHub top language](https://img.shields.io/github/languages/top/NagiPragalathan/WebTorch?style=flat-square)\n[![Telegram](https://img.shields.io/badge/telegram-nagipragalathan-yellow.svg?logo=telegram)](https://t.me/nagipragalathan)\n![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)\n[![Read FAQ](https://img.shields.io/badge/Ask%20Question-Read%20FAQ-000000)](https://www.newton.so/view?tags=LCTP)\n![GitHub Repo stars](https://img.shields.io/github/stars/NagiPragalathan/WebTorch?style=social)\n[![Twitter Follow](https://img.shields.io/twitter/follow/nagipragalathan?style=social)](https://twitter.com/NagiPragalathan)\n\n\u003cdiv align=\"center\"\u003e\n\n**LCTP** is a Selenium-based Low-Code Web Testing Automation tool in Python. It simplifies web testing using JSON configuration files, making it easy for testers and developers to automate test scenarios.\n\nIt's a powerful tool designed to streamline your testing efforts, and we're constantly improving it. However, please note that it's still a work in progress and not ready for production use.\n\n[Getting started](#getting-started) ~ [Supported opcodes](#supported-opcodes) ~\n[Build](#build) ~ [Test](#test) ~\n[Report a bug](https://github.com/)\n~ [Questions](https://www.newton.so/view?tags=LCTP)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://media3.giphy.com/media/9MbgJKNugBIi6QDwEf/200w.webp?cid=ecf05e474m3sg50anfj1rfi5m8628lnk3tqkd77089nsi4y8\u0026rid=200w.webp\u0026ct=g\" height=\"400\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ch2\u003e Fear of coding the testing files use the LCTP to relieve your complexity and upgrade your automation using LCTP for your application. \u003c/h2\u003e\n\u003c/div\u003e\n\n# Setup:\n## Installation:\nInstall LCTP using the following command: `pip install LCTP`\n\n## Usage:\n\u003chr/\u003e\n\u003cpre\u003e\n{ \u003cbr/\u003e\n    \"setup\":{\u003cbr/\u003e\n        \"driver_path\" : \"../../../path\", \u003cbr/\u003e\n        \"auto_install\":\"true\", \u003cbr/\u003e\n        \"browser\":\"Opera\", \u003cbr/\u003e\n        \"get\":\"https://www.saucedemo.com/\", \u003cbr/\u003e\n        \"window\" : \"maximize\" \u003cbr/\u003e\n        \"screen_recorder\":\"true\",\n        \"run_amd_wait\":\"true\"\n    }\u003cbr/\u003e\n}\u003cbr/\u003e\n\u003c/pre\u003e\n\u003chr/\u003e\nThe `setup` keyword is mandatory when using LCTP.\n\n1. `driver_path`: Provide the path to the Selenium Chrome driver executable.\n2. `auto_install`: Automatically download and install the Chrome driver if not found.\n3. `browser`: Specify the browser to be used (e.g., Chrome, Firefox).\n4. `get`: Define the URL of the landing page.\n5. `window`: It's recommended to use \"maximize\" to maximize the browser window. You can also use \"minimize\" if needed.\n6. `screen_recorder`: Enable screen recording of the testing session.\n7. `run_and_wait`: Wait for the browser window to run the program.\n\nAuto_install can handle the following browsers:\n\u003cpre\u003e\n        1. Chrome\n        2. ChromeService\n        3. Brave\n        4. BraveService\n        5. Firefox\n        6. FirefoxService\n        7. IE\n        8. IEService\n        9. Edge\n        10. EdgeService\n        11. Opera\n\u003c/pre\u003e\n\n## Get Elements  \n### Supported selectors: ['id', 'name', 'class', 'xpath']\n\u003cpre\u003e\n'id': Get elements by their ID attribute.\n'name': Get elements by their Name attribute.\n'class': Get elements by their Class attribute.\n'xpath': Get elements by their XPath.\n\u003c/pre\u003e\n\n### Examples:\n\u003cpre\u003e\n{   \n    \"setup\":{\n        \"driver_path\" : \"../../../path\",\n        \"auto_install\":\"true\",\n        \"browser\":\"Opera\",  //\n        \"get\":\"https://www.saucedemo.com/\", //\n        \"window\" : \"maximize\" //\n    },\n    \"login_testing\":{\n        \"fill_user_name\" : {\n            \"id\" : \"user-name:sk:minimize\",\n            \"data\" : \"standard_user\"\n        },\n        \"fill_password\":{\n            \"id\":\"password:sk\",\n            \"data\":\"secret_sauce\"\n        },\n        \"click_login_btn\":{\n            \"id\":\"login-button:click\"\n        }\n    },\n }\n\u003c/pre\u003e\n\n### Click a list of Elements line by line\nlist_data = ['ls_id_clk', 'ls_name_clk', 'ls_xpath_clk']\n\n\u003cpre\u003e\n{   \n    \"setup\":{\n        \"driver_path\" : \"../../../path\",\n        \"auto_install\":\"true\",\n        \"browser\":\"Opera\",  //\n        \"get\":\"https://www.saucedemo.com/\", //\n        \"window\" : \"maximize\" //\n    },\n    \"login_testing\":{\n        \"fill_user_name\" : {\n            \"id\" : \"user-name:sk:minimize\",\n            \"data\" : \"standard_user\"\n        },\n        \"fill_password\":{\n            \"id\":\"password:sk\",\n            \"data\":\"secret_sauce\"\n        },\n        \"click_login_btn\":{\n            \"id\":\"login-button:click\"\n        }\n    },\n    \"home_page\":{\n        \"ls_id_clk\" : [\"add-to-cart-sauce-labs-backpack\",\"add-to-cart-sauce-labs-bike-light\",\"add-to-cart-sauce-labs-fleece-jacket\"],\n        \"ls_name_clk\" : [\"add-to-cart-test.allthethings()-t-shirt-(red)\",\"add-to-cart-sauce-labs-bolt-t-shirt\",\"add-to-cart-sauce-labs-onesie\"]\n    },\n    \"view_cart\":{\n        \"select_select_box\":{\n            \"xpath\":\"//*[@id='header_container']/div[2]/div[2]/span/select:select_by_index@2\"   \n        },\n        \"nav_to_view_cart\":{\n            \"xpath\": \"//*[@id='shopping_cart_container']/a:click:minimize\",\n            \"window\":  \"maximize\"\n        }\n    }\n}\n\u003c/pre\u003e\n\n### ScreenShot and ScreenRecorder\n`\"screen_recorder\":\"true\"`: Enable screen recording from the beginning to the end of the test, and it is implemented only in the setup query. The recordings are stored in the Test_Video folder path.\u003cbr/\u003e\n`\"take\":\"screenshot\"`: Take a screenshot of the task at any line of code. The screenshots are stored in the ScreenShots folder path.\n\n### Keywords\n#### Send Keys\n1. `sk`: Send keys to input fields. You can send keys using two ways: `:sk` and `:sk@data`. If `:sk` is used alone, then the data should be declared in another line.\n2. 'c\u0026sk': Clear the input field and send keys, similar to `sk`.\n\u003cpre\u003e\n \"fill_password\":{\n            \"id\":\"password:sk\",\n            \"data\":\"secret_sauce\"\n        },\n \"fill_changepassword\":{\n            \"id\":\"changepassword:c\u0026sk\",\n            \"data\":\"secret_sauce\"\n        },\n\u003c/pre\u003e\n\n#### Window Controller\n1. `window`: Use it with any field to maximize or minimize the browser window.\n2. `set_window_position`: Set the position of the browser window.\n\u003cpre\u003e\n\"nav_to_view_cart\":{\n            \"xpath\": \"//*[@id='shopping_cart_container']/a:click:minimize\",\n            \"window\":  \"maximize\"\n        }\n\"nav_to_view_cart\":{\n            \"xpath\": \"//*[@id='shopping_cart_container']/a:click:minimize\",\n            \"window\":  \"minimize\"\n        }\n\u003c/pre\u003e\n\n# Selenium Low-Code Web Testing Automation Hot Keys\n\nThis Python module simplifies web testing with Selenium WebDriver using a low-code approach. It enables developers or testers to write test scenarios using JSON configuration files. Below is the documentation for the project, along with code examples for each section.\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Usage](#usage)\n    - [Setup Configuration](#setup-configuration)\n    - [Login Testing](#login-testing)\n    - [Home Page Testing](#home-page-testing)\n    - [View Cart Testing](#view-cart-testing)\n    - [Additional Example](#additional-example)\n3. [JSON Configuration](#json-configuration)\n    - [Setup Section](#setup-section)\n    - [Login Testing Section](#login-testing-section)\n    - [Home Page Section](#home-page-section)\n    - [View Cart Section](#view-cart-section)\n4. [Advanced Features](#advanced-features)\n    - [Screen Recording](#screen-recording)\n    - [Running and Waiting](#running-and-waiting)\n    - [Taking Screenshots](#taking-screenshots)\n    - [Executing Python Code](#executing-python-code)\n5. [Additional Example Configuration](#additional-example-configuration)\n6. [Contributing](#contributing)\n7. [License](#license)\n\n## Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\nYou can install this module using pip:\n\n```\npip install selenium-webtest\n```\n## Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nTo use this module, follow these steps:\n\n1. Create a JSON configuration file for your test scenarios.\n2. Utilize the `WebTestExecutor` class to execute your tests.\n\nHere's how you can structure your JSON configuration file and perform different test actions:\n\n### Setup Configuration \u003ca name=\"setup-configuration\"\u003e\u003c/a\u003e\n\nThe `setup` section in your JSON configuration file is used to set up your test environment. It includes the following parameters:\n\n- `driver_path` (str): The path to your WebDriver executable (e.g., ChromeDriver).\n- `auto_install` (str): Automatically install the WebDriver if it's not found (set to `\"true\"` to enable).\n- `browser` (str): Specify the browser to use (e.g., \"Opera\").\n- `get` (str): The URL of the website to be tested.\n- `window` (str): Maximize the browser window (set to \"maximize\" to enable).\n\n**Example:**\n\n\n\u003cpre\u003e{\n    \"setup\": {\n        \"driver_path\": \"../../../path\",\n        \"auto_install\": \"true\",\n        \"browser\": \"Opera\",\n        \"get\": \"https://www.saucedemo.com/\",\n        \"window\": \"maximize\"\n    },\n    ...\n}\u003c/pre\u003e \n\n### Login Testing \u003ca name=\"login-testing\"\u003e\u003c/a\u003e\n\nThe `login_testing` section defines actions related to logging into a website. It includes the following parameters:\n\n- `fill_user_name`: Fill the username input field.\n- `fill_password`: Fill the password input field.\n- `click_login_btn`: Click the login button.\n\n**Example:**\n\n\n\u003cpre\u003e{\n    \"login_testing\": {\n        \"fill_user_name\": {\n            \"id\": \"user-name:sk:minimize\",\n            \"data\": \"standard_user\"\n        },\n        \"fill_password\": {\n            \"id\": \"password:sk\",\n            \"data\": \"secret_sauce\",\n            \"take\": \"screenshot\"\n        },\n        \"click_login_btn\": {\n            \"id\": \"login-button:click\"\n        }\n    },\n    ...\n}\u003c/pre\u003e \n\n### Home Page Testing \u003ca name=\"home-page-testing\"\u003e\u003c/a\u003e\n\nThe `home_page` section defines actions for interacting with elements on the home page of the website. It includes the following parameters:\n\n- `set_window_position` (optional): Set the position of the browser window.\n- `ls_id_clk`: Click elements by their IDs.\n- `ls_name_clk`: Click elements by their names.\n\n**Example:**\n\n\n\u003cpre\u003e{\n    \"home_page\": {\n        \"set_window_position\": [10, 10],\n        \"ls_id_clk\": [\n            \"add-to-cart-sauce-labs-backpack\",\n            \"add-to-cart-sauce-labs-bike-light\",\n            \"add-to-cart-sauce-labs-fleece-jacket\"\n        ],\n        \"ls_name_clk\": [\n            \"add-to-cart-test.allthethings()-t-shirt-(red)\",\n            \"add-to-cart-sauce-labs-bolt-t-shirt\",\n            \"add-to-cart-sauce-labs-onesie\"\n        ]\n    },\n    ...\n}\u003c/pre\u003e \n\n### View Cart Testing \u003ca name=\"view-cart-testing\"\u003e\u003c/a\u003e\n\nThe `view_cart` section defines actions for viewing the shopping cart. It includes the following parameters:\n\n- `select_select_box`: Select an option from a dropdown menu by index.\n- `nav_to_view_cart`: Navigate to the shopping cart and maximize the window.\n\n**Example:**\n\n\n\u003cpre\u003e{\n    \"view_cart\": {\n        \"select_select_box\": {\n            \"xpath\": \"//*[@id='header_container']/div[2]/div[2]/span/select:select_by_index@2\"\n        },\n        \"nav_to_view_cart\": {\n            \"xpath\": \"//*[@id='shopping_cart_container']/a:click:minimize\",\n            \"window\": \"maximize\"\n        }\n    },\n    ...\n}\u003c/pre\u003e \n\n### Additional Example Configuration \u003ca name=\"additional-example\"\u003e\u003c/a\u003e\n\nHere's an additional example of JSON configuration to perform web testing actions:\n\n\n\u003cpre\u003e{\n    \"setup\": {\n        \"web_driver_location\": \"path\",\n        \"dict\": {\n            \"a\": {\n                \"id\": \"hello\"\n            }\n        }\n    },\n    \"login_page\": {\n        \"msg\": \"to login into\",\n        \"id\": \"id\",\n        \"name\": \"name\",\n        \"xpath\": \"xpath\",\n        \"link_text\": \"LINK_TEXT\",\n        \"tag_name\": \"TAG_NAME\",\n        \"partial_link_text\": \"PARTIAL_LINK_TEXT\",\n        \"class_name\": \"CLASS_NAME\",\n        \"css_selector\": \"CSS_SELECTOR\",\n        \"send_key\": \"values\",\n        \"sleep\": \"2s\"\n    }\n}\u003c/pre\u003e \n\nThis example illustrates how to configure the web driver location and login page testing actions using various element attributes.\n\n## JSON Configuration \u003ca name=\"json-configuration\"\u003e\u003c/a\u003e\n\n### Setup Section \u003ca name=\"setup-section\"\u003e\u003c/a\u003e\n\nThe `setup` section includes parameters for configuring the test environment. It must be the first section in your JSON configuration file.\n\n- `driver_path` (str): The path to the WebDriver executable.\n- `auto_install` (str): Automatically install the WebDriver if not found (set to `\"true\"` to enable).\n- `browser` (str): Specify the browser to use.\n- `get` (str): The URL of the website to test.\n- `window` (str): Maximize the browser window after opening.\n\n### Login Testing Section \u003ca name=\"login-testing-section\"\u003e\u003c/a\u003e\n\nThe `login_testing` section defines actions for logging into a website.\n\n- Each action should be a JSON object with a unique name.\n- Specify the target element using its attributes (e.g., `id`, `xpath`).\n- Use the `data` field to provide input data (e.g., username and password).\n- Use `take` to take a screenshot after the action (optional).\n- Use `click` to perform a click action (optional).\n\n### Home Page Section \u003ca name=\"home-page-section\"\u003e\u003c/a\u003e\n\nThe `home_page` section defines actions for interacting with elements on the home page of the website.\n\n- `set_window_position` (optional): Set the position of the browser window.\n- `ls_id_clk` (list of str): Click elements by their IDs.\n- `ls_name_clk` (list of str): Click elements by their names.\n\n### View Cart Section \u003ca name=\"view-cart-section\"\u003e\u003c/a\u003e\n\nThe `view_cart` section defines actions for viewing the shopping cart.\n\n- `select_select_box` (optional): Select an option from a dropdown menu by index.\n- `nav_to_view_cart` (optional): Navigate to the shopping cart and maximize the window.\n\n## Advanced Features \u003ca name=\"advanced-features\"\u003e\u003c/a\u003e\n\n### Screen Recording \u003ca name=\"screen-recording\"\u003e\u003c/a\u003e\n\nEnable screen recording during testing by setting `\"screen_recorder\"` to `\"true\"` in the `setup` section.\n\n### Running and Waiting \u003ca name=\"running-and-waiting\"\u003e\u003c/a\u003e\n\nSet `\"run_and_wait\"` to `\"true\"` in the `setup` section to make the script wait for elements to become visible or clickable before performing actions.\n\n### Taking Screenshots \u003ca name=\"taking-screenshots\"\u003e\u003c/a\u003e\n\nTake screenshots after specific actions by adding `\"take\": \"screenshot\"` to those actions in the `login_testing` section.\n\n### Executing Python Code \u003ca name=\"executing-python-code\"\u003e\u003c/a\u003e\n\nExecute custom Python code during testing by setting `\"code\"` to `\"true\"` in a login action. Specify your Python code in the `\"python_code\"` field or provide a file path using `\"python_code_path\"`.\n\n## Additional Example Configuration \u003ca name=\"additional-example-configuration\"\u003e\u003c/a\u003e\n\nHere's an additional example configuration demonstrating web driver location setup and login page testing actions. You can configure various element attributes for testing different web pages.\n\n## Contributing \u003ca name=\"contributing\"\u003e\u003c/a\u003e\n\nContributions to this project are welcome. Feel free to submit bug reports, feature requests, or pull requests on the GitHub repository.\n## Usage:\n  \u003cpre\u003e    -h, --help: Show this help message.\n    --version, --V, --v: Show version information.\n    -test \u003ctest_file\u003e: Run tests based on a JSON configuration file.\n    -req \u003crequirements_file\u003e: Create a requirements.txt file.\n    -f \u003cpython_file\u003e: Format a single Python file.\n    -fa \u003cdirectory\u003e: Format all Python files in a directory.\n\u003c/pre\u003e\n\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e\n\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagipragalathan%2Fwebtorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagipragalathan%2Fwebtorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagipragalathan%2Fwebtorch/lists"}