Help with running tests on testable-projects-fcc

In wsl yarn start works fine. I set the .env file to BROWSER_PATH='/mnt/c/Program Files/Google/Chrome/Application/chrome.exe' but when I try to run yarn test I get errors like the following:

 1) Projects Tests
       Project "Tribute Page" should pass all tests:
     WebDriverError: unknown error: DevToolsActivePort file doesn't exist
      at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:522:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:548:13)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:474:28)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

Also, I notice that a chrome shell opens up at the start of each test, but the shells aren’t closing on their own leaving me with this:

In addition, some of the open terminals are showing an additional error:

image

Edit

I turned on HEADLESS and VERBOSE and it went through each project, and gave me this for each one:

Starting ChromeDriver 94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}) on port 36135
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

After it did that, it went through each project again and started giving me the same error from before. I wonder if by only local connections it means I can’t run the Windows version of Google Chrome from wsl? The problem is, I’ve been having trouble getting Chrome installed on the wsl distro, and I’m running into errors trying to run yarn start in a windows terminal.

UPDATE 2: I tried setting the BROWSER_PATH TO /mnt/bin/google-chrome-stable and now I’m getting a new error:

     SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 99.0.4844.51 with binary path /usr/bin/google-chrome-stable
      at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:522:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:548:13)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:474:28)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

I solved this by using /usr/bin/firefox/

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.