{"id":26587495,"url":"https://github.com/adamopoulosa1980/selenium-test-builder","last_synced_at":"2026-02-24T07:02:44.076Z","repository":{"id":283815048,"uuid":"950559872","full_name":"adamopoulosa1980/selenium-test-builder","owner":"adamopoulosa1980","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-22T10:32:12.000Z","size":475,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T11:26:30.211Z","etag":null,"topics":["automated-testing","chrome-extension","proof-of-concept","selenium","webapp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamopoulosa1980.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-18T10:54:12.000Z","updated_at":"2025-03-22T10:38:16.000Z","dependencies_parsed_at":"2025-03-22T11:38:01.230Z","dependency_job_id":null,"html_url":"https://github.com/adamopoulosa1980/selenium-test-builder","commit_stats":null,"previous_names":["adamopoulosa1980/selenium-test-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamopoulosa1980%2Fselenium-test-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamopoulosa1980%2Fselenium-test-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamopoulosa1980%2Fselenium-test-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamopoulosa1980%2Fselenium-test-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamopoulosa1980","download_url":"https://codeload.github.com/adamopoulosa1980/selenium-test-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245098817,"owners_count":20560471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["automated-testing","chrome-extension","proof-of-concept","selenium","webapp"],"created_at":"2025-03-23T12:20:07.476Z","updated_at":"2026-02-24T07:02:44.002Z","avatar_url":"https://github.com/adamopoulosa1980.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Test Builder Chrome Extension\n\nThe **Selenium Test Builder** is a Chrome extension designed to simplify the creation of test scenarios and user journeys for the `selenium-cucumber-test` automation suite. It allows testers to visually select elements on a web page, define actions (e.g., `click`, `enter`, `navigate`), and specify assertions (e.g., `url`, `visible`), then generates and appends these as entries in the `tests.properties` file. This tool is ideal for non-technical users and speeds up test development within a Selenium-Cucumber-Java framework.\n\n## Features\n- **Visual Element Selection**: Point-and-click to choose inputs, buttons, or links on the page with hover highlighting.\n- **Action Definition**: Select from supported actions like `navigate`, `enter`, and `click`.\n- **Assertion Builder**: Define checks for URLs, element visibility, and more.\n- **Properties Generation**: Outputs `tests.properties`-compatible snippets for your test suite.\n- **Integration**: Works seamlessly with the `selenium-cucumber-test` project.\n- **User-Friendly**: No coding required—build tests directly in the browser.\n\n## Prerequisites\n- **Chrome Browser**: Version 90 or higher (tested with 134).\n- **Target Web Application**: A running instance of your web app (e.g., `http://localhost:3000` from `selenium-cucumber-webapp`).\n- **Selenium-Cucumber-Test Suite**: The parent project must be set up with `tests.properties` in `src/test/resources/testdata/`.\n\n## Screenshot\n![screenshot](/plugin.png)\n\n## Installation\n\n1. **Clone or Download the Extension**:\n   - Clone the repository or download the `selenium-test-builder` folder:\n     ```bash\n     git clone \u003crepository-url\u003e\n     cd selenium-test-builder\n     ```\n   - Alternatively, extract a provided ZIP file.\n\n2. **Ensure Icon Exists**:\n   - Create a 16x16 PNG file named `icon.png` (e.g., a simple logo or shape) and place it in the `selenium-test-builder` directory.\n\n3. **Load the Extension in Chrome**:\n   - Open Chrome and go to `chrome://extensions/`.\n   - Enable **Developer mode** (toggle in the top-right corner).\n   - Click **Load unpacked** and select the `selenium-test-builder` folder.\n   - The extension icon should appear in your toolbar.\n\n4. **Verify Setup**:\n   - Pin the extension to your toolbar for easy access.\n   - Ensure your web app (e.g., `http://localhost:3000`) is running via `npm start` in `selenium-cucumber-webapp`.\n\n## Usage\n\n### Creating a New Test\n1. **Open the Web Application**:\n   - Navigate to your target app (e.g., `http://localhost:3000/login`).\n\n2. **Load the Sidebar**:\n   - The extension automatically displays a yellow sidebar with a red border on the right side of the page when loaded on `http://localhost:3000/*`.\n\n3. **Define Test Metadata**:\n   - **Test ID**: Enter a unique identifier (e.g., `guest_login`).\n   - **Description**: Add a brief description (e.g., \"Guest login and cart navigation\").\n   - **Data-Driven**: Check if using a CSV file (optional), and specify the file (e.g., `testdata/users.csv`).\n   - **Reset Driver**: Leave unchecked unless testing multiple users.\n   - **Start Page**: Set the initial page (e.g., `login`).\n\n4. **Add Actions**:\n   - Click **Add Action** in the sidebar.\n   - Move your cursor over the page; it should change to a crosshair, and elements should highlight with a blue outline on hover.\n   - Click an element (e.g., a button or input) to select it.\n   - Choose an action from the dropdown (e.g., `enter`, `click`, `navigate`) and fill in fields like `Value` (e.g., `testuser`) or `targetPage` (e.g., `cart`).\n   - Repeat to build the user journey (e.g., enter username, click login, navigate to cart).\n\n5. **Add Assertions**:\n   - Click **Add Assertion**.\n   - Select a type (e.g., `url`, `visible`), enter a value (e.g., `/cart`), and choose a condition (e.g., `contains`).\n   - Add more as needed.\n\n6. **Generate the Test**:\n   - Click **Generate \u0026 Download** to create a `tests.properties` snippet.\n   - A file named `test_snippet.properties` will download.\n\n7. **Integrate with `tests.properties`**:\n   - Open `test_snippet.properties` from your Downloads folder.\n   - Copy its contents.\n   - Paste into `src/test/resources/testdata/tests.properties` in your `selenium-cucumber-test` project.\n   - Example output:\n     ```properties\n     test.guest_login.description=Guest login and cart navigation\n     test.guest_login.startPage=login\n     test.guest_login.actions[0].action=navigate\n     test.guest_login.actions[0].targetPage=login\n     test.guest_login.actions[1].page=login\n     test.guest_login.actions[1].element=username\n     test.guest_login.actions[1].action=enter\n     test.guest_login.actions[1].value=guest@example.com\n     test.guest_login.actions[2].page=login\n     test.guest_login.actions[2].element=loginButton\n     test.guest_login.actions[2].action=click\n     test.guest_login.actions[3].action=navigate\n     test.guest_login.actions[3].targetPage=cart\n     test.guest_login.assertions[0].type=url\n     test.guest_login.assertions[0].value=/cart\n     test.guest_login.assertions[0].condition=contains\n     ```\n\n8. **Run the Test**:\n   - In your `selenium-cucumber-test` project:\n     ```bash\n     mvn test -Dcucumber.filter.tags=\"@guest_login\"\n     ```\n\n## Project Structure\n```\nselenium-test-builder/\n├── manifest.json        # Extension configuration\n├── content.js          # Injects and manages the sidebar\n├── background.js       # Handles toolbar click and downloads\n├── icon.png            # Toolbar icon (16x16 PNG)\n└── README.md           # This documentation\n```\n\n## Supported Actions\n| Action       | Description                       | Fields in UI                |\n|--------------|-----------------------------------|-----------------------------|\n| `navigate`   | Navigates to a page              | `targetPage`                |\n| `enter`      | Enters text into an input        | `page`, `element`, `value`  |\n| `click`      | Clicks an element                | `page`, `element`           |\n\n## Supported Assertions\n| Type      | Description                       | Fields in UI                |\n|-----------|-----------------------------------|-----------------------------|\n| `url`     | Checks current URL               | `value`, `condition`        |\n| `visible` | Checks element visibility        | `page`, `element`, `condition` |\n\n## Limitations\n- **File Appending**: Currently downloads a snippet due to Chrome’s security restrictions. Direct appending requires additional setup (future enhancement).\n- **Element Detection**: Relies on elements having `id` attributes; falls back to tag names if missing, which may need manual adjustment.\n- **Single Browser**: Chrome-only for now.\n\n## Troubleshooting\n- **Sidebar Not Visible**:\n  - Open DevTools (`Ctrl+Shift+I`) \u003e Console and check for logs like:\n    ```\n    Selenium Test Builder: Content script loaded on http://localhost:3000/\n    Creating panel\n    Panel appended to DOM\n    ```\n  - If missing, verify your app’s URL matches `http://localhost:3000/*` in `manifest.json`. Update `matches` if different (e.g., `http://localhost:8080/*`).\n\n- **No Element Highlighting**:\n  - Click **Add Action** and check the console for:\n    ```\n    Add Action button clicked\n    Starting element selection\n    Highlighting element: \u003ctag\u003e \u003cid\u003e\n    ```\n  - If logs stop at `Starting element selection`, ensure no page scripts block `mouseover` events.\n  - Test on a simple page (e.g., `http://localhost:3000/login`) and inspect the DOM.\n\n- **Plugin Not Loading**:\n  - Ensure `icon.png` exists (16x16 PNG) in the directory.\n  - Check `chrome://extensions/` \u003e Errors for issues.\n\n- **Test Fails After Adding**:\n  - Verify `baseUrl` in `config.dev.properties` matches your app (e.g., `http://localhost:3000`).\n  - Run `mvn test -X -e \u003e output.log` and review logs.\n\n## Development\n\n### Prerequisites\n- **Chrome**: For testing and loading the extension.\n\n### Build Instructions\n1. Edit files in `selenium-test-builder/`.\n2. Reload the extension in `chrome://extensions/` after changes.\n\n### Future Enhancements\n- **Direct File Appending**: Integrate with a local server or File System Access API.\n- **More Actions**: Add support for `kafkaProduce`, `restCall`, etc.\n- **Validation**: Preview and validate snippets before saving.\n\n## Contributing\n- Report issues or suggest features via the repository’s issue tracker.\n- Submit pull requests to enhance functionality or fix bugs.\n\n## License\nMIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamopoulosa1980%2Fselenium-test-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamopoulosa1980%2Fselenium-test-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamopoulosa1980%2Fselenium-test-builder/lists"}