mechanical-orchard / playwright-elixir

An Elixir library for Playwright web automation
MIT License
119 stars 23 forks source link

Test run failures should not cause subsequent tests to time out. #39

Open coreyti opened 2 years ago

coreyti commented 2 years ago

example:

test/playwright_test.exs:7
** (FunctionClauseError) no function clause matching in Playwright.Browser.new_page/2

The following arguments were given to Playwright.Browser.new_page/2:
    # 1
    {:error, %Playwright.Channel.Error{message: "Timeout 30000ms exceeded."}}
    # 2
    %{}

Attempted function clauses (showing 1 out of 1):
  def new_page(%Playwright.Browser{session: session} = browser, options)

stacktrace:
  (playwright 0.1.17-preview-6) lib/playwright/browser.ex:153: Playwright.Browser.new_page/2
  test/playwright_test.exs:3: Playwright.PlaywrightTest.__ex_unit_setup_0/1
  test/playwright_test.exs:1: Playwright.PlaywrightTest.__ex_unit__/2
ry4n1m3 commented 4 months ago

👍🏻 We see this when we look for an element that doesn't exist within the timeout, the subsequent tests that re-use the browser don't recover. We'd like to see these timeouts returned as error tuples that don't crash the browser ideally

cc @mattwynne