Skip to content

MOB-38657: Add unhandledPromptBehavior: ignore capability across all browser options#1976

Open
ssudame2 wants to merge 4 commits intomasterfrom
MOB-38657a
Open

MOB-38657: Add unhandledPromptBehavior: ignore capability across all browser options#1976
ssudame2 wants to merge 4 commits intomasterfrom
MOB-38657a

Conversation

@ssudame2
Copy link
Copy Markdown
Contributor

@ssudame2 ssudame2 commented Apr 6, 2026

Root Cause:

  • unhandledPromptBehavior: ignore was inconsistently applied — only Chrome had it in its options method (_get_chrome_options); Firefox had it buried in profile methods only.
  • Edge, WebKitGTK (Safari/MiniBrowser), and the ArgOptions fallback (triggered when no explicit browser: is set in YAML and browser is chosen externally, e.g. via BlazeMeter UI) had no unhandledPromptBehavior set at all The ArgOptions path is the most impactful gap — any remote cloud run without an explicit browser: in YAML silently skipped this capability.

Fix:

  • Added options.set_capability('unhandledPromptBehavior', 'ignore') to all browser options methods in generator.py:
    • _get_firefox_options() — was missing; only existed in profile methods
    • _get_edge_options() — was entirely absent
    • _get_webkitgtk_options() — was entirely absent
    • ArgOptions fallback in _get_options() — was entirely absent; this covers remote runs where browser is selected outside of taurus YAML (e.g. BlazeMeter cloud UI)
  • Chrome (_get_chrome_options) was already correct — no change

Test Cases Covered:

  • Chrome (local) — capability already present via _get_chrome_options; unchanged
  • Firefox (local) — capability now set at options level, consistent with Chrome
  • Edge (local, Selenium 4+) — capability now set via _get_edge_options
  • Safari/MiniBrowser (remote BlazeMeter grid) — capability now set via _get_webkitgtk_options

Remote run with no explicit browser in YAML (e.g. BlazeMeter cloud) — capability now set via ArgOptions fallback; this was the primary reported failure case (test_requests.py showed ArgOptions() with no unhandledPromptBehavior)

Each PR must conform to Developer's Guide.

Quick checklist:

  • Description of PR explains the context of change
  • Unit tests cover the change, no broken tests
  • No static analysis warnings (Codacy etc.)
  • Documentation update ('available in the unstable snapshot' warning if necessary)
  • Changes file inside site/dat/docs/changes directory, one-line note of change inside

…browser options

**Root Cause**:
- unhandledPromptBehavior: ignore was inconsistently applied — only Chrome had it in its options method (_get_chrome_options); Firefox had it buried in profile methods only.
- Edge, WebKitGTK (Safari/MiniBrowser), and the ArgOptions fallback (triggered when no explicit browser: is set in YAML and browser is chosen externally, e.g. via BlazeMeter UI) had no unhandledPromptBehavior set at all
The ArgOptions path is the most impactful gap — any remote cloud run without an explicit browser: in YAML silently skipped this capability.

**Fix**:
- Added options.set_capability('unhandledPromptBehavior', 'ignore') to all browser options methods in generator.py:
	- _get_firefox_options() — was missing; only existed in profile methods
	- _get_edge_options() — was entirely absent
	- _get_webkitgtk_options() — was entirely absent
	- ArgOptions fallback in _get_options() — was entirely absent; this covers remote runs where browser is selected outside of taurus YAML (e.g. BlazeMeter cloud UI)
- Chrome (_get_chrome_options) was already correct — no change

**Test Cases Covered**:
- Chrome (local) — capability already present via _get_chrome_options; unchanged
- Firefox (local) — capability now set at options level, consistent with Chrome
- Edge (local, Selenium 4+) — capability now set via _get_edge_options
- Safari/MiniBrowser (remote BlazeMeter grid) — capability now set via _get_webkitgtk_options

Remote run with no explicit browser in YAML (e.g. BlazeMeter cloud) — capability now set via ArgOptions fallback; this was the primary reported failure case (test_requests.py showed ArgOptions() with no unhandledPromptBehavior)
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (ea643e4) to head (dbc42b5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1976      +/-   ##
==========================================
- Coverage   89.91%   89.85%   -0.06%     
==========================================
  Files          71       71              
  Lines       20182    20182              
==========================================
- Hits        18145    18132      -13     
- Misses       2037     2050      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant