Bird
0
0

You wrote this GitHub Actions workflow to run Selenium tests but it fails with "command not found: python":

medium📝 Troubleshoot Q14 of 15
Selenium Python - CI/CD Integration
You wrote this GitHub Actions workflow to run Selenium tests but it fails with "command not found: python":
name: Selenium Tests
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run tests
        run: python test_suite.py
What is the likely fix?
AAdd a step to set up Python using actions/setup-python
BChange 'python' to 'python3' in the run command
CRemove the checkout step
DAdd 'pip install selenium' before running tests
Step-by-Step Solution
Solution:
  1. Step 1: Identify missing Python setup

    The error "command not found: python" means Python is not installed or set up in the runner.
  2. Step 2: Add Python setup step

    Using actions/setup-python installs and configures Python before running tests.
  3. Final Answer:

    Add a step to set up Python using actions/setup-python -> Option A
  4. Quick Check:

    Python setup missing causes error = D [OK]
Quick Trick: Always set up Python before running Python commands [OK]
Common Mistakes:
  • Assuming python3 is available without setup
  • Skipping Python setup step
  • Removing checkout step unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes