Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(android): added recent apps button (#5331)

Nareshcc749fe6796c
diff --git a/src/dispatchers/androidDispatcher.ts b/src/dispatchers/androidDispatcher.ts
index aba3f4f674..b049596fad 100644
--- a/src/dispatchers/androidDispatcher.ts
+++ b/src/dispatchers/androidDispatcher.ts
@@ -281,6 +281,7 @@ const keyMap = new Map<string, number>([
['Slash', 76],
['/', 76],
['At', 77],
+ ['@', 77],
['Num', 78],
['HeadsetHook', 79],
['Focus', 80],
@@ -288,4 +289,9 @@ const keyMap = new Map<string, number>([
['Menu', 82],
['Notification', 83],
['Search', 84],
+ ['AppSwitch', 187],
+ ['Assist', 219],
+ ['Cut', 277],
+ ['Copy', 278],
+ ['Paste', 279],
]);
diff --git a/types/types.d.ts b/types/types.d.ts
index 9a97beb80e..e82c661fa6 100644
--- a/types/types.d.ts
+++ b/types/types.d.ts
@@ -7290,14 +7290,20 @@ export type AndroidKey =
'Semicolon' | ';' |
'Apostrophe' | '`' |
'Slash' | '/' |
- 'At' |
+ 'At' | '@' |
'Num' |
'HeadsetHook' |
'Focus' |
'Plus' | '+' |
'Menu' |
'Notification' |
- 'Search';
+ 'Search' |
+ 'RecentApps' |
+ 'AppSwitch' |
+ 'Assist' |
+ 'Cut' |
+ 'Copy' |
+ 'Paste';
// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};
diff --git a/utils/generate_types/overrides.d.ts b/utils/generate_types/overrides.d.ts
index 6fed0b2dc2..0f10b187c1 100644
--- a/utils/generate_types/overrides.d.ts
+++ b/utils/generate_types/overrides.d.ts
@@ -303,14 +303,20 @@ export type AndroidKey =
'Semicolon' | ';' |
'Apostrophe' | '`' |
'Slash' | '/' |
- 'At' |
+ 'At' | '@' |
'Num' |
'HeadsetHook' |
'Focus' |
'Plus' | '+' |
'Menu' |
'Notification' |
- 'Search';
+ 'Search' |
+ 'RecentApps' |
+ 'AppSwitch' |
+ 'Assist' |
+ 'Cut' |
+ 'Copy' |
+ 'Paste';
// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};