drevops / behat-screenshot

🧪 Behat extension and step definitions to create HTML and image screenshots on demand or when tests fail
GNU General Public License v3.0
22 stars 7 forks source link

Selenium fails to connect (local and CircleCI) #56

Closed xurizaemon closed 1 year ago

xurizaemon commented 1 year ago

Tests fail the Selenium test currently.

I see the same error locally as well - all other tests pass, then feature "Selenium screenshots" hangs at "Ensure that screenshots for Selenium driver can be captured." then times out with "" after a few minutes wait.

Feature: Selenium screenshots

  Ensure that screenshots for Selenium driver can be captured.

  ┌─ @BeforeScenario # DrevOps\BehatScreenshotExtension\Context\ScreenshotContext::beforeScenarioInit()
  │
  ╳  Could not open connection: Could not start a new session. New session request timed out 
  ╳  Host info: host: '3b446d376eed', ip: '192.168.112.3'
  ╳  Build info: version: '4.13.0', revision: 'ba948ece5b*'
  ╳  System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.2.0-34-generic', java.version: '11.0.20.1'
  ╳  Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)
  │
  @phpserver @javascript
  Scenario: Capture a screenshot using Selenium driver          # tests/behat/features/selenium.feature:6
    When I am on the screenshot test page                       # FeatureContext::goToScreenshotTestPage()
    And save screenshot                                         # DrevOps\BehatScreenshotExtension\Context\ScreenshotContext::iSaveScreenshot()
    Then file wildcard "*.selenium.feature_8.png" should exist  # FeatureContext::assertFileShouldExist()
    And file wildcard "*.selenium.feature_8.html" should exist  # FeatureContext::assertFileShouldExist()
    And save 800 x 600 screenshot                               # DrevOps\BehatScreenshotExtension\Context\ScreenshotContext::iSaveSizedScreenshot()
    Then file wildcard "*.selenium.feature_11.png" should exist # FeatureContext::assertFileShouldExist()
    And save 1440 x 900 screenshot                              # DrevOps\BehatScreenshotExtension\Context\ScreenshotContext::iSaveSizedScreenshot()
    And file wildcard "*.selenium.feature_13.html" should exist # FeatureContext::assertFileShouldExist()

--- Skipped scenarios:

    tests/behat/features/selenium.feature:6

18 scenarios (17 passed, 1 skipped)
130 steps (122 passed, 8 skipped)
5m14.69s (14.19Mb)

Same result in CircleCI: https://app.circleci.com/pipelines/github/xurizaemon/behat-screenshot/13/workflows/3a5a3502-a19f-4da3-89ee-cdc59164ce75/jobs/14

AlexSkrypnyk commented 1 year ago

This is most likely related to the version of the Chrome container. All containers should have been pinned. This is now fixed. Please pull from main and rebuild the stack.

Please feel free to re-open if the issue persists.

Thank you