@guidepup/playwright 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ## [Documentation](https://guidepup.dev) | [API Reference](https://www.guidepup.dev/docs/api/class-guidepup)
8
8
 
9
9
  [![MacOS Sonoma Support](https://img.shields.io/badge/macos-Somona-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sonoma/id6450717509)
10
- [![MacOS Sequoia Support](https://img.shields.io/badge/macos-Somona-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sequoia/id6596773750)
10
+ [![MacOS Sequoia Support](https://img.shields.io/badge/macos-Sequoia-blue.svg?logo=apple)](https://apps.apple.com/us/app/macos-sequoia/id6596773750)
11
11
  [![MacOS Tahoe Support](https://img.shields.io/badge/macos-Tahoe-blue.svg?logo=apple)](https://www.apple.com/uk/os/macos/)
12
12
  [![Windows Server 2022 Support](https://img.shields.io/badge/windows_server-2022-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022)
13
13
  [![Windows Server 2025 Support](https://img.shields.io/badge/windows_server-2025-blue.svg?logo=windows)](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2025)
@@ -22,21 +22,24 @@ exports.voiceOverTest = test_1.test.extend({
22
22
  voiceOverPlaywright.navigateToWebContent = async (clearLogs = true) => {
23
23
  // Ensure application is brought to front and focused.
24
24
  await (0, guidepup_1.macOSActivate)(applicationName);
25
+ // Cancel auto navigation
26
+ await voiceOverPlaywright.perform({ keyCode: guidepup_1.MacOSKeyCodes.Control });
25
27
  // Ensure the document is ready and focused.
26
28
  await page.bringToFront();
27
29
  await page.locator("body").waitFor();
28
- await page.locator("body").focus();
29
- await page.locator("body").click();
30
- await page.locator("body").blur();
31
- // Try to navigate into web content.
30
+ // Open the web item chooser.
31
+ await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.openItemChooser);
32
+ // Filter by "web content" - currently web content items for all browsers
33
+ // are suffixed by "web content".
34
+ await voiceOverPlaywright.type("web content");
35
+ // Select the web content window spot.
36
+ await voiceOverPlaywright.perform({ keyCode: guidepup_1.MacOSKeyCodes.Enter });
37
+ // Navigate into web content.
32
38
  await voiceOverPlaywright.interact();
33
- // Series of find previous commands to escape accidental interaction
34
- // with sub-content of web content area.
35
- await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.findPreviousHeading);
36
- await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.findPreviousGraphic);
37
- await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.findPreviousPlainText);
38
39
  // Navigate to the beginning of the web content.
39
40
  await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.moveToBeginningOfText);
41
+ // Cancel auto navigation
42
+ await voiceOverPlaywright.perform({ keyCode: guidepup_1.MacOSKeyCodes.Control });
40
43
  if (clearLogs) {
41
44
  // Clear out logs.
42
45
  await voiceOverPlaywright.clearItemTextLog();
@@ -45,6 +48,8 @@ exports.voiceOverTest = test_1.test.extend({
45
48
  };
46
49
  await voiceOverPlaywright.start(voiceOverStartOptions);
47
50
  await (0, guidepup_1.macOSActivate)(applicationName);
51
+ // Cancel auto navigation
52
+ await voiceOverPlaywright.perform({ keyCode: guidepup_1.MacOSKeyCodes.Control }, { capture: false });
48
53
  await use(voiceOverPlaywright);
49
54
  }
50
55
  finally {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guidepup/playwright",
3
- "version": "0.16.0",
4
- "description": "Screen reader driver for Playwright tests.",
3
+ "version": "0.16.2",
4
+ "description": "Screen reader automation library for Playwright testing. ",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "author": "Craig Morten <craig.morten@hotmail.co.uk>",