{"id":25553117,"url":"https://github.com/alisson-t-bucchi/stickerfy_selenium_python","last_synced_at":"2026-04-24T12:32:01.104Z","repository":{"id":269169559,"uuid":"905375533","full_name":"alisson-t-bucchi/stickerfy_selenium_python","owner":"alisson-t-bucchi","description":" Stickerfy website automation tests with Selenium webdriver and Python. ","archived":false,"fork":false,"pushed_at":"2025-05-02T17:56:56.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T05:43:54.532Z","etag":null,"topics":["e2e-tests","html-reports","page-object-model","personal-project","pytest","python","selenium-webdriver"],"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}},"created_at":"2024-12-18T17:40:15.000Z","updated_at":"2025-05-02T17:57:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a915128-6d0b-4e8c-bcbf-a2927426852a","html_url":"https://github.com/alisson-t-bucchi/stickerfy_selenium_python","commit_stats":null,"previous_names":["alisson-t-bucchi/stickerfy-selenium-python","alisson-t-bucchi/stickerfy_selenium_python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alisson-t-bucchi/stickerfy_selenium_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fstickerfy_selenium_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fstickerfy_selenium_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fstickerfy_selenium_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fstickerfy_selenium_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/stickerfy_selenium_python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisson-t-bucchi%2Fstickerfy_selenium_python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32223874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["e2e-tests","html-reports","page-object-model","personal-project","pytest","python","selenium-webdriver"],"created_at":"2025-02-20T11:42:52.384Z","updated_at":"2026-04-24T12:32:01.087Z","avatar_url":"https://github.com/alisson-t-bucchi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Project - Page Object Model (POM)\n\nThis project uses the Page Object Model (POM) pattern for automated tests with Selenium. \nIt was developed to test the [Stickerfy](https://stickerfy.herokuapp.com/) website and organizes test scenarios for different interactions on the site.\nBased in pytest framework tool, using fixtures to invoke conftest.py and with specific names for each test.\n\n## Project Structure\n\n```\nselenium-project-pom/\n|-- .venv/                              # Virtual environment containing dependencies\n|-- conftest.py                         # Global configurations and pytest fixtures\n|-- pages/                              # POM files representing the site pages\n|   |-- __init__.py                     # Makes the folder a Python module\n|   |-- base_page.py                    # Base class with reusable generic methods\n|   |-- checkout_page.py                # Represents the checkout page\n|   |-- home_page.py                    # Represents the homepage\n|   |-- select_sticker.py               # Manages sticker selection\n|   |-- shopping_cart_page.py           # Manages interactions on the shopping cart page\n|\n|-- tests/                              # Tests organized by scenario\n    |-- firstScenario                   # Tests using \"Go to Cart\" button\n    |-- secondScenario                  # Tests using \"Shopping Cart\" button\n    |-- thirdScenario                   # Tests for remove one of each stickers\n    |-- foutyScenario                   # Tests for remove all sctickers\n\n## Prerequisites\n\n1. Python 3.8 or higher installed.\n2. Google Chrome installed.\n3. ChromeDriver compatible with your Chrome version.\n4. Install project dependencies:\n\n```bash\npip install selenium pytest\n```\n\n## Project Pattern (POM)\n\nThe Page Object Model pattern organizes code so that interaction logic with the interface is separate from the tests. This facilitates maintenance and reuse.\n\n- **`base_page.py`**:\n  Contains reusable generic methods, such as clicking on elements or locating them.\n\n- **Other files in `pages/`**:\n  Each file represents a page of the site, encapsulating specific elements and their interactions.\n\nExample of a method in `base_page.py`:\n\n```python\nimport conftest\nfrom selenium.webdriver.support.wait import WebDriverWait\nfrom selenium.webdriver.support import expected_conditions as EC\nfrom selenium.webdriver import ActionChains\n\nclass BasePage:\n    def __init__(self):\n        self.driver = conftest.driver\n\n    def find_element(self, locator):\n        return self.driver.find_element(*locator)\n\n    def find_elements(self, locator):\n        return self.driver.find_elements(*locator)\n\n    def click(self, locator):\n        return self.find_element(locator).click()\n\n    def navbar_title(self, locator):\n        assert self.find_element(locator).is_displayed(), f\"Element {'locator'} not found!\"\n\n    def find_text_element(self, locator):\n        self.wait_element(locator)\n        return self.find_text_element(locator).text\n\n    def wait_element(self, locator, timeout=5):\n        return WebDriverWait(self.driver, timeout).until(EC.presence_of_element_located(locator))\n\n    def double_click(self, locator):\n        element = self.find_element(locator)\n        ActionChains(self.driver).double_click(element).perform()\n```\n\n## Running the Tests\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/alisson-t-bucchi/stickerfy_selenium_python.git \n```\n\n2. Navigate to the project directory:\n\n```bash\ncd stickerfy-selenium-python\n```\n\n3. Run the all tests:\n\n```bash\npytest tests\n```\n\n4. Run one specific test:\n\n```bash\npytest .\\tests\\(path to the test)\n```\n\n5. Run the all tests with HTML Report and customize the report location (here called reports folder), filename and an the report title:\n\n```bash\npytest tests/ --html-report=./reports/ --title='write you report name here!'\n```\nThe results will be displayed into the reports folder with 2 files:\n1. output.json\n2. pytest_html_report.html (open with your favourite browser to see the results)\n\n## Test Structure\n\nTests are organized by scenario within the `tests/` folder. Each subfolder represents a specific flow based in diferent buttons or functions presented in each screen:\n\n1. **`using_go_to_cart_button/`**:\n   Tests navigation to the cart using the \"Go to Cart\" button.\n\n2. **`using_remove_1_button/`**:\n   Validates the removal of items from the cart.\n\n3. **`using_shopping_cart_button/`**:\n   Tests navigation to the cart using the \"Shopping Cart\" button.\n\nExample of a test:\n\n```python\nimport pytest\nimport conftest\nfrom pages.checkout_page import CheckoutPage\nfrom pages.home_page import HomePage\nfrom pages.select_sticker import SelectSticker\nfrom pages.shopping_cart_page import ShoppingCartPage\n\n@pytest.mark.usefixtures(\"setup_teardown\")\n@pytest.mark.buyHappyScene1\n\nclass TestBuyHappy:\n    def test_buy_happy(self):\n        driver = conftest.driver\n        home_page = HomePage()\n        select_sticker = SelectSticker()\n        go_to_cart_page = ShoppingCartPage()\n        verify_products = ShoppingCartPage()\n        complete_checkout = CheckoutPage()\n\n        #open Stickerfy page.\n        home_page.successful_login()\n\n        #select Happy sticker clicking in Add to cart blue button.\n        select_sticker.sticker_happy()\n\n        #go to cart page.\n        go_to_cart_page.click_go_to_cart_button()\n\n        #verification of Happy Sticker into cart page.\n        verify_products.verify_happy()\n\n        #click on checkout and confirm checkout.\n        complete_checkout.full_checkout_page()\n```\n\n## Contribution\n\nContributions are welcome! Feel free to open an issue or submit a pull request with improvements.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisson-t-bucchi%2Fstickerfy_selenium_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisson-t-bucchi%2Fstickerfy_selenium_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisson-t-bucchi%2Fstickerfy_selenium_python/lists"}