Utilizing the new Clock API allows to manipulate and control time within tests to verify time-related behavior. This API covers many common scenarios, including:
testing with predefined time;
keeping consistent time and timers;
monitoring inactivity;
ticking through time manually.
// Initialize clock with some time before the test time and let the page load
// naturally. `Date.now` will progress as the timers fire.
page.clock().install(new Clock.InstallOptions().setTime("2024-02-02T08:00:00"));
page.navigate("http://localhost:3333");
Locator locator = page.getByTestId("current-time");
// Pretend that the user closed the laptop lid and opened it again at 10am.
// Pause the time once reached that point.
page.clock().pauseAt("2024-02-02T10:00:00");
// Assert the page state.
assertThat(locator).hasText("2/2/2024, 10:00:00 AM");
// Close the laptop lid again and open it at 10:30am.
page.clock().fastForward("30:00");
assertThat(locator).hasText("2/2/2024, 10:30:00 AM");
Multiple methods like locator.click() or locator.press() now support a ControlOrMeta modifier key. This key maps to Meta on macOS and maps to Control on Windows and Linux.
// Press the common keyboard shortcut Control+S or Meta+S to trigger a "Save" operation.
page.keyboard.press("ControlOrMeta+S");
New property httpCredentials.send in apiRequest.newContext() that allows to either always send the Authorization header or only send it in response to 401 Unauthorized.
Playwright now supports Chromium, Firefox and WebKit on Ubuntu 24.04.
v1.45 is the last release to receive WebKit update for macOS 12 Monterey. Please update macOS to keep using the latest WebKit.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the maven-low-risk group with 4 updates: org.apache.maven.plugins:maven-surefire-plugin, io.github.bonigarcia:webdrivermanager, org.junit.vintage:junit-vintage-engine and com.microsoft.playwright:playwright.
Updates
org.apache.maven.plugins:maven-surefire-plugin
from 3.2.5 to 3.3.0Release notes
Sourced from org.apache.maven.plugins:maven-surefire-plugin's releases.
... (truncated)
Commits
d0b96a4
[maven-release-plugin] prepare release surefire-3.3.071796af
Bump org.codehaus.plexus:plexus-component-annotationsafb2d4e
Bump org.codehaus.plexus:plexus-interpolation from 1.25 to 1.27e6287dd
[SUREFIRE-2232] [REGRESSION] StatelessXmlReporter fails to process failed res...57b7837
Bump org.htmlunit:htmlunit from 3.11.0 to 4.2.0fd440c4
Bump org.xmlunit:xmlunit-core from 2.9.1 to 2.10.05c34c43
Bump org.assertj:assertj-core from 3.25.3 to 3.26.0680fb00
Bump org.apache.commons:commons-compress from 1.26.1 to 1.26.2cad0931
[SUREFIRE-2248] Make "type" attribute on failures and errors in (surefire|fai...a88d786
[SUREFIRE-2047] Upgrade to maven-common-artifact-filters 3.4.0Updates
io.github.bonigarcia:webdrivermanager
from 5.8.0 to 5.9.1Changelog
Sourced from io.github.bonigarcia:webdrivermanager's changelog.
Commits
9b559ce
[maven-release-plugin] prepare release webdrivermanager-5.9.10e170f9
Update CHANGELOG for version 5.9.1bef8e1d
Remove using jackson-databind 2.17.1b3ea803
Update doc for version 5.9.0ab1dbde
[maven-release-plugin] prepare for next development iteration6cd95ef
[maven-release-plugin] prepare release webdrivermanager-5.9.0b22b80a
Update CHANGELOG for version 5.9.0cc0f5ca
Bump to CDP 126 in some tests805b5ad
Update mirror info (Sat Jun 22 12:02:08 UTC 2024)2d0a25c
Update mirror info (Fri Jun 21 12:02:31 UTC 2024)Updates
org.junit.vintage:junit-vintage-engine
from 5.10.2 to 5.10.3Release notes
Sourced from org.junit.vintage:junit-vintage-engine's releases.
Commits
55d1232
Release 5.10.34455093
Remove accidental headingb86a681
Remove JDK 21 as it's no longer available via Oracle's setup-java stepbc1608c
Clean up release notes316ed31
Use Liberica for JDK 8 for compatibility with Apple Siliconad7c5dd
Update copyright headers to 20246c663b1
Use same default seed for method and class ordering (#3821)d29e3eb
Fix NPE when deserializingTestIdentifier
(#3820)f936c01
Fix class-level execution conditions on GraalVM (#3785)76b7c05
Allow GraalVmStarterTests to run remotely on Test Distribution agentsUpdates
com.microsoft.playwright:playwright
from 1.44.0 to 1.45.0Release notes
Sourced from com.microsoft.playwright:playwright's releases.
... (truncated)
Commits
507e2c2
chore: set version to 1.45.0 (#1611)d9ac70c
chore: roll driver to 1.45.0-beta (#1610)4279a4e
chore(deps): bump org.apache.maven.plugins:maven-jar-plugin from 3.4.1 to 3.4...141afb1
chore(deps): bump org.apache.maven.plugins:maven-clean-plugin from 3.3.2 to 3...2eaae58
chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 t...e4828d0
chore: roll 1.45.0 (#1609)a08ab2d
devops: roll_driver script (#1605)626050d
fix: Update README.md to fix wrong demo code (#1601)4cc3fa3
chore: roll driver to 1.45.0 beta, implement new features (#1600)226d075
chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.3 to...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show