Skip to content

Implement Search Module with Data-Driven Pytest Automation and BaseAction Enhancements#45

Merged
14-Prasanna merged 5 commits into
mainfrom
Prasanna
Jun 14, 2026
Merged

Implement Search Module with Data-Driven Pytest Automation and BaseAction Enhancements#45
14-Prasanna merged 5 commits into
mainfrom
Prasanna

Conversation

@14-Prasanna

Copy link
Copy Markdown
Collaborator

Pull Request Details

PR Information

  • PR Number: Tamil #38
  • Author: Prasanna Venkatesh K — @prasanna-14
  • Created Date: 2026-06-14
  • Branch Name: Prasanna
  • Target Branch: main

Team Information


Related Issue

Fixes #
Closes #


Summary

Implemented the Search module for the Pytest automation framework.
This includes the search locators page, search action class, Excel test data file,
and three fully parametrised test scenarios converted from BDD Cucumber —
keyword search, no-result search, and manufacturer filter validation.
BaseAction was also updated with additional reusable Selenium helper methods.


Detailed Changes

Added

  • pages/search_locators.py — XPath locators for search bar, result cards, no-results message, and manufacturer label
  • actions/search_action.py — Search action class with keyword entry, result validation, no-result message checks, and manufacturer verification
  • data_provider/SearchProduct.xlsx — Excel test data file with keyword and manufacturer columns (iMac/Apple, Canon/Canon, HP/Hewlett-Packard)
  • tests/test_search.py — Three pytest test functions covering keyword search, no-result search, and manufacturer filter scenarios with logger integration

Modified

  • actions/base_action.py — Added find_elements(), clear(), get_input_value(), get_elements_text(), dismiss_alert_if_present(), scroll_into_view(), move_slider(), and is_present() helper methods
  • utils/excelReader.py — Updated SEARCH_EXCEL_PATH constant to point to data_provider/SearchProduct.xlsx

Removed

  • Nothing removed

Refactored

  • Nothing refactored

Type of Change

  • Bug Fix
  • New Feature
  • Enhancement
  • Refactoring
  • Performance Improvement
  • Test Automation
  • CI/CD Changes
  • Documentation Update
  • Dependency Upgrade

Testing Performed

Pytest Execution

  • All tests passed
  • Smoke suite passed
  • Sanity suite passed
  • Regression suite passed
  • E2E suite passed
  • Negative test scenarios verified

Browsers Tested

  • Chrome
  • Firefox
  • Headless Chrome
  • Headless Firefox

Evidence

Attach screenshots, logs, videos, reports, or execution results if applicable.


Configuration Changes

  • config.ini modified
  • pytest.ini modified
  • requirements.txt updated
  • Environment variables added
  • No configuration changes

Impact Analysis

Affected Modules:

  • Search
  • Base Action
  • Excel Data Provider

Potential Risks:

  • Low ✅

Rollback Plan:

  • Revert tests/test_search.py, actions/search_action.py, and pages/search_locators.py — no changes to shared infrastructure beyond additive BaseAction methods

Checklist

Code Quality

  • Code follows project standards
  • No hardcoded values
  • Logging added where required
  • Exception handling implemented
  • Unused imports removed
  • PEP8 guidelines followed

Testing

  • Test cases added/updated
  • Existing tests are passing
  • Local execution verified

Documentation

  • README updated
  • Comments added where necessary
  • Documentation updated

CI/CD

  • GitHub Actions passed
  • Build succeeded
  • No merge conflicts

Reviewer Notes

  • Manufacturer filter test (test_manufacturer_filter_search) reads keyword and expected manufacturer from SearchProduct.xlsx — ensure the sheet tab name matches SEARCH_SHEET constant in test_search.py
  • No-result keywords (Kiot, ffgok) are hardcoded in the test as they are intentional negative cases, not data-driven
  • Logger writes to logs/logs.log at every test step — check logs for detailed execution trace

Final Approval

@14-Prasanna 14-Prasanna self-assigned this Jun 14, 2026
@14-Prasanna 14-Prasanna added enhancement New feature or request Improvement Code Improvement new-feature New Feature Created labels Jun 14, 2026

@Rishwanth-Adhishwar Rishwanth-Adhishwar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Viewed Your Changes And Ready to merge

@14-Prasanna 14-Prasanna merged commit c353f2a into main Jun 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Improvement Code Improvement new-feature New Feature Created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants