@guidepup/playwright 0.16.0 → 0.16.1
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 +1 -1
- package/lib/voiceOverTest.js +14 -9
- package/package.json +1 -1
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
|
[](https://apps.apple.com/us/app/macos-sonoma/id6450717509)
|
|
10
|
-
[](https://apps.apple.com/us/app/macos-sequoia/id6596773750)
|
|
11
11
|
[](https://www.apple.com/uk/os/macos/)
|
|
12
12
|
[](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022)
|
|
13
13
|
[](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2025)
|
package/lib/voiceOverTest.js
CHANGED
|
@@ -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
|
-
|
|
29
|
-
await
|
|
30
|
-
|
|
31
|
-
//
|
|
30
|
+
// Open the web item rotor defaulting to window spots.
|
|
31
|
+
await voiceOverPlaywright.perform(voiceOverPlaywright.keyboardCommands.openWebItemRotor);
|
|
32
|
+
// Filter by "content" - currently web content spots for all browsers
|
|
33
|
+
// are prefixed by "Content -".
|
|
34
|
+
await voiceOverPlaywright.type("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 {
|