{"id":24184504,"url":"https://github.com/alisson-t-bucchi/webform_selenium_behave_python","last_synced_at":"2026-05-08T12:46:32.513Z","repository":{"id":272008442,"uuid":"915067098","full_name":"alisson-t-bucchi/webform_selenium_behave_python","owner":"alisson-t-bucchi","description":"BDD automation test for Webform Page in Python using Selenium, Behave and Allure Reports plugins.","archived":false,"fork":false,"pushed_at":"2025-05-01T20:32:47.000Z","size":1177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T04:07:16.294Z","etag":null,"topics":["allure-report","bdd-tests","behave","personal-project","python","selenium-webdriver","webforms-pages"],"latest_commit_sha":null,"homepage":"","language":"Python","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/alisson-t-bucchi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-10T22:26:06.000Z","updated_at":"2025-05-01T20:32:50.000Z","dependencies_parsed_at":"2025-03-02T23:24:38.189Z","dependency_job_id":"07d86245-f588-4fe8-9a65-65f89ead2046","html_url":"https://github.com/alisson-t-bucchi/webform_selenium_behave_python","commit_stats":null,"previous_names":["alisson-t-bucchi/webform_selenium_behave_python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alisson-t-bucchi/webform_selenium_behave_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fwebform_selenium_behave_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fwebform_selenium_behave_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fwebform_selenium_behave_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fwebform_selenium_behave_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alisson-t-bucchi","download_url":"https://codeload.github.com/alisson-t-bucchi/webform_selenium_behave_python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fwebform_selenium_behave_python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32781561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["allure-report","bdd-tests","behave","personal-project","python","selenium-webdriver","webforms-pages"],"created_at":"2025-01-13T10:15:26.725Z","updated_at":"2026-05-08T12:46:32.482Z","avatar_url":"https://github.com/alisson-t-bucchi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Behave WebForm Test\n\nThis project implements automation tests for the [Selenium Web Form](https://www.selenium.dev/selenium/web/web-form.html) page using **Behave** (a BDD testing framework for Python), **Selenium WebDriver** and **Allure Reports** to create detailed performance reports.\n\n## 📝 Objective\n\nThe goal of this project is to demonstrate how to use **Behave** and **Selenium WebDriver** to create and execute automated tests based on scenarios described in the Gherkin language.\n\n## 🚀 Technologies Used\n\n- [Python](https://www.python.org/) - Programming language\n- [Behave](https://behave.readthedocs.io/) - Framework for Behavior-Driven Development (BDD)\n- [Selenium WebDriver](https://www.selenium.dev/documentation/) - Browser automation\n- [Gherkin](https://cucumber.io/docs/gherkin/) - Language for describing test scenarios\n\n## 📂 Project Structure\n\nThe main code resides in the Behave step definition file, which connects the scenarios described in Gherkin files to Python code.\n\n## 📝 Step File Organization\nHere's the information organized in a **table format**:  \n\n| **Feature File**                   | **Description of Scenarios**                          | **Step File**                 | **Step Definitions Purpose**                                                       |  \n|------------------------------------|-------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------|  \n| **webform_actions_part_1.feature** | Scenarios for text, password, and textarea inputs.    | **webform_actions_part_1.py** | Contains step definitions for handling input scenarios.                            |  \n| **webform_actions_part_2.feature** | Scenarios for dropdown boxes.                         | **webform_actions_part_2.py** | Contains step definitions for handling dropdown scenarios.                         |  \n| **webform_actions_part_3.feature** | Scenarios for file input, checkbox and radio buttons. | **webform_actions_part_3.py** | Contains step definitions for handling file input and buttons scenarios.           |  \n| **webform_actions_part_4.feature** | Scenarios for color, date picker and range bar.       | **webform_actions_part_4.py** | Contains step definitions for handling color, date picker and range bar scenarios. |\n\n\nIt includes three main steps:\n\n1. **Given:** Opens the web form page.\n2. **When:** Enters text into the input field.\n3. **Then:** Clicks the submit button.\n\n```python\n@given(u'the browser open Webform page')\n@when(u'insert a information in the text input field')\n@then(u'the submit button will be clicked')\n```\n\n## Example Gherkin Scenario\nAn example of how a scenario can be described in Gherkin in the features/form_test.feature file:\n\n```gherkin\nFeature: Test the Selenium Web Form\n\n  Scenario: Fill and submit the form\n    Given the browser open Webform page\n    When insert a information in the text input field\n    Then the submit button will be clicked\n```\n\n## Files project structure\n\n```\nwebform_selenium_behave_python/\n├── allure-reports/             # Directory for Allure reports\n├── features/                   # Tests and automation logic\n│   ├── pages/                  # Page Objects (Page Object Pattern)\n│   ├── steps/                  # Step definitions (separated by part)\n│   ├── *.feature               # Gherkin test scenarios\n├── behave.ini                  # Behave configuration\n├── requirements.txt            # Project dependencies\n├── README.md                   # Project documentation\n```\n\n## ⚙️ Installation and Setup\nFollow these steps to set up and run the project:\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/your-username/selenium-behave-webform.git\ncd selenium-behave-webform\n```\n\n2. Create a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # Linux/Mac\nvenv\\Scripts\\activate     # Windows\n```\n\n3. Install the dependencies:\n```bash\npip install -r requirements.txt\n```\nMake sure the requirements.txt file includes the following dependencies:\n```\nbehave\nselenium\n```\n\n4. Install the WebDriver for your browser (e.g., ChromeDriver for Google Chrome). Ensure the driver is added to your system PATH.\n\n## ▶️ Running the Tests\nTo run the tests, use the following command:\n```bash\nbehave\n```\nThis will execute all scenarios described in the .feature files within the features directory.\n\n## 🗒️ Generating Allure Reports \n1. Install AlLure:\nAllure can be installed in various ways. Choose the method that best fits your environment:\n\n## Option 1: Use the Allure Commandline\nVia Homebrew (macOS/Linux):\n```bash\nbrew install allure\n```\n\nVia Chocolatey (Windows): \nFirst, install Chocolatey. Then:\n```bash\nchoco install allure\n```\n\nVia Binary (manual):\nDownload the zip file from Allure Releases.\nExtract the contents and add the binary directory to your PATH.\n\n2. Install Allure plugin for Python:\nInstall the allure-behave package, which integrates Allure with Behave.\n```bash\npip install allure-behave\n```\n\n3. Set up project for Allure\nMake sure Behave test results are generated in a format compatible with Allure:\n- Run Behave with the Allure Plugin: When running your Behave tests, include the -f allure_behave.formatter:AllureFormatter option to use the Allure format and -o allure-results to specify the output directory for the results.\n\nExample:\n```bash\nbehave -f allure_behave.formatter:AllureFormatter -o allure-results\n```\n-f: Specifies the report format.  \n\n-o: Specifies the output directory. \n\n- Final Structure: After running the tests, Allure results will be saved in a directory called allure-results.\n\n4. Generate HTML Report\nOnce the results are generated, use the Allure Commandline to create the report:\n\n- Run the command to generate and view the report:\n\n```bash\nallure serve allure-results\n``` \nThis will open the report in your default browser. The report is served from a temporary local server.\n\n- To create a static report:\n```bash\nallure generate allure-results -o allure-report\n```\n- allure-results: Directory containing the raw test results.\n- allure-report: Directory where the HTML report will be saved.\n\n- To view the static report:\n```bash\nallure open allure-report\n```\n\n## 📚 Resources and References\n- Selenium Documentation\n- Behave Documentation\n- Guide to Writing Gherkin Scenarios\n\n## 🤝 Contributing\nContributions are welcome! Follow these steps to contribute:\n1. Fork this repository.\n2. Create a branch for your changes (git checkout -b feature/new-feature). \n3. Commit your changes (git commit -m 'Add new feature'). \n4. Push to your branch (git push origin feature/new-feature). \n5. Open a Pull Request.\n\nMade with ❤️ by Alisson (https://github.com/alisson-t-bucchi)\nLet me know if you need any additional modifications! 🚀","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisson-t-bucchi%2Fwebform_selenium_behave_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisson-t-bucchi%2Fwebform_selenium_behave_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisson-t-bucchi%2Fwebform_selenium_behave_python/lists"}