Skip to content

Refactor HeadlessBaseTest for improved options and cleanup#12

Open
Atelange wants to merge 1 commit intomasterfrom
Atelange-patch-4
Open

Refactor HeadlessBaseTest for improved options and cleanup#12
Atelange wants to merge 1 commit intomasterfrom
Atelange-patch-4

Conversation

@Atelange
Copy link
Copy Markdown
Collaborator

@Atelange Atelange commented Mar 2, 2026

Updated ChromeOptions for headless mode and added teardown method.

Updated ChromeOptions for headless mode and added teardown method.
Copilot AI review requested due to automatic review settings March 2, 2026 10:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the headless Selenium TestNG base test setup to use more CI-friendly ChromeOptions and ensures the browser is always closed after each test method.

Changes:

  • Updated Chrome window sizing for headless runs (--window-size=1920,1080) instead of --start-maximized.
  • Switched headless flag to Chrome’s newer headless mode (--headless=new).
  • Added an @AfterMethod(alwaysRun = true) teardown to quit() the driver after each test, and made validateTitles_Products public.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants