Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Oct 02:43
· 3 commits to main since this release
c7269ce
uses: github.com/mozership/probe-browser@634baa8dff2b273ed326996fec4d91c2dba9d38b # v0.2.0

Highlights

  • wait_text waits for the text expected (#3). With equals, contains or matches, it reads the text again until it is the one expected, rather than read whatever is there once the element is visible, such as Loading. When the timeout runs out, the step fails with the last text read, and the page is saved. equals: "" waits for an empty text.
  • select chooses an option (#4). It chooses the option whose value, or else whose label, is the one given, and fires input and change as a user's choice does. An option that is not there or is disabled, a disabled <select>, and an element that is not a <select> fail the step with the reason.
  • A login carries over to a later step (#5). save_storage_state writes the cookies, HttpOnly ones included, and the localStorage of the open page's origin to a file, readable only by the user, and with.storage_state starts a browser with them. The file has the shape of Playwright's storage state.
  • res.console_errors (#7). It lists the errors the page wrote to its console while the actions ran: console.error, a failed console.assert, and an exception or promise rejection nothing caught, each with where it came from. A failure's message names the first five.

Changed behavior

  • select used to set the element's value attribute, which chooses no option of a <select> and fires no event, and it passed for a value no option has. A step that relied on that passing now fails with the values of the options.
  • A step that set equals, contains or matches on an action other than wait_text is refused.

Testing

  • The e2e fixture pages are served by a Go server in e2e/server rather than Python's http.server, so the tests need nothing but Go (#6). The e2e runs through Probe with probe-action.

See the README.