Repository navigation
Releases: mozership/probe-browser
Releases · mozership/probe-browser
Release list
v0.2.0
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.
v0.1.0
uses: github.com/mozership/probe-browser@42dda412d5d183c091f8baf071237cc090f16052 # v0.1.0Highlights
- The first release of the browser action as an action of its own. It was the built-in
browseraction of Probe up to v1.21.0, and Probe v1.22.0 no longer has it. - The same
withand the same result: a step changes only itsuses, frombrowserto the line above. - Its
action.ymldeclaresparams, soprobe checkreports a key ofwiththe action does not take. It declares no guard.
From the built-in action
# Before, with Probe v1.21.0 or earlier
- uses: browser
# After
- uses: github.com/mozership/probe-browser@42dda412d5d183c091f8baf071237cc090f16052 # v0.1.0- The action drives a real Chrome through chromedp, which has to be installed where Probe runs, as before.
- It cannot tell what a page will do, so it declares no guard: under
--read-onlyor--allow-host, a step that uses it is refused unless--allow-actionnames it, as the built-in action was. - It needs Probe v1.21.0 or later.
- Its e2e runs it through Probe v1.21.0 in Chrome against a fixture page: reading the page, a full-page screenshot, and the page saved when an action fails.
See Browser.
For library users
The package moved here: github.com/linyows/probe/actions/browser is now github.com/mozership/probe-browser/browser, with the same API.
Changelog
- 22d0454 Drive a browser from a Probe workflow, as an action of its own