Bird
0
0

You want to run Selenium tests in GitHub Actions but need to use a headless browser. Which step should you add to the workflow to support this?

hard📝 Application Q9 of 15
Selenium Python - CI/CD Integration
You want to run Selenium tests in GitHub Actions but need to use a headless browser. Which step should you add to the workflow to support this?
AUse a Windows runner instead of Ubuntu
BRun tests without any browser installation
CInstall a headless browser like Chromium and set DISPLAY environment variable
DSkip browser setup and rely on default GUI
Step-by-Step Solution
Solution:
  1. Step 1: Understand headless browser requirement

    Headless browsers run without GUI, need installation and environment setup.
  2. Step 2: Add steps to install Chromium and configure DISPLAY

    Install Chromium and set DISPLAY variable to enable headless mode in Linux runners.
  3. Final Answer:

    Install a headless browser like Chromium and set DISPLAY environment variable -> Option C
  4. Quick Check:

    Headless browser setup = C [OK]
Quick Trick: Install headless browser and configure environment for GUI-less tests [OK]
Common Mistakes:
  • Assuming tests run headless by default
  • Skipping browser installation
  • Changing OS runner unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes