Repository navigation
uses: github.com/mozership/probe-browser@634baa8dff2b273ed326996fec4d91c2dba9d38b # v0.2.0Highlights
wait_textwaits for the text expected (#3). Withequals,containsormatches, it reads the text again until it is the one expected, rather than read whatever is there once the element is visible, such asLoading. When the timeout runs out, the step fails with the last text read, and the page is saved.equals: ""waits for an empty text.selectchooses an option (#4). It chooses the option whose value, or else whose label, is the one given, and firesinputandchangeas 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_statewrites the cookies,HttpOnlyones included, and the localStorage of the open page's origin to a file, readable only by the user, andwith.storage_statestarts 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 failedconsole.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
selectused to set the element'svalueattribute, 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,containsormatcheson an action other thanwait_textis refused.
Testing
- The e2e fixture pages are served by a Go server in
e2e/serverrather than Python'shttp.server, so the tests need nothing but Go (#6). The e2e runs through Probe with probe-action.
See the README.