mirror of
https://github.com/playwright-community/playwright-go.git
synced 2026-06-03 21:02:27 +08:00
* chore: roll to Playwright v1.40.1
* feat: SetInputFiles now can use file path
files can be one of: string, []string, InputFile, []InputFile
* refactor: wrap all playwright errors
BREAKING CHANGE:
- `ErrPlaywright` wraps all Playwright errors
- `ErrTimeout` wraps all timeout errors and replaces `TimeoutError`
22 lines
289 B
Go
22 lines
289 B
Go
package playwright
|
|
|
|
type webErrorImpl struct {
|
|
err error
|
|
page Page
|
|
}
|
|
|
|
func (e *webErrorImpl) Page() Page {
|
|
return e.page
|
|
}
|
|
|
|
func (e *webErrorImpl) Error() error {
|
|
return e.err
|
|
}
|
|
|
|
func newWebError(page Page, err error) WebError {
|
|
return &webErrorImpl{
|
|
err: err,
|
|
page: page,
|
|
}
|
|
}
|