What happened?
Issue:
The keyboard shortcut on macOS to enable firefox picture-in-picture mode is command + Shift + option + ]. In JavaScript these are dispatched as 3 KeyboardEvents: 'Meta/Command', 'Alt', 'Shift', 'β'. The β key is sent with a combination of option/alt + ]. It is impossible to send this combination using WebDriver.
Steps to reproduce:
await action.keyDown(Key.ALT).sendKeys(']').keyDown(Key.COMMAND).keyDown(Key.SHIFT).perform();
Expected result:
Picture in picture launched in Firefox
A trusted KeyboardEvent is dispatched that looks like:
isTrusted: true
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: "BracketRight"
composed: true
ctrlKey: false
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isComposing: false
key: "]"
keyCode: 221
location: 0
metaKey: false
repeat: false
returnValue: true
shiftKey: false
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: body
target: body
timeStamp: 61259.80000001192
type: "keyup"
view: Window {window: Window, self: Window, document: document, name: '', location: Location, β¦}
which: 221
[[Prototype]]: KeyboardEvent
Actual events:
action.sendKeys(Key.ALT).sendKeys('β').perform()
isTrusted: true
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: ""
composed: true
ctrlKey: false
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isComposing: false
key: "β"
keyCode: 0
location: 0
metaKey: false
repeat: false
returnValue: true
shiftKey: false
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: body
target: body
timeStamp: 4728.29999999702
type: "keydown"
view: Window {window: Window, self: Window, document: document, name: '', location: Location, β¦}
which: 0
[[Prototype]]: KeyboardEvent
action.sendKeys(Key.ALT).sendKeys(']').perform()
isTrusted: true
altKey: true
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: "BracketRight"
composed: true
ctrlKey: false
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isComposing: false
key: "]"
keyCode: 221
location: 0
metaKey: false
repeat: false
returnValue: true
shiftKey: false
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: body
target: body
timeStamp: 4046.5
type: "keydown"
view: Window {window: Window, self: Window, document: document, name: '', location: Location, β¦}
which: 221
[[Prototype]]: KeyboardEvent
How can we reproduce the issue?
const { Builder, Key, By, until } = require('selenium-webdriver');
(async function example() {
let driver = await new Builder().forBrowser('firefox').build();
try {
await driver.get('http://developers.canal-plus.com/rx-player/');
await driver.wait(until.elementLocated(By.className('choice-input-button')), 10000);
// To see the event in the console
await driver.executeScript(() => {
window.addEventListener('keydown', (e) => {
console.log(e);
});
});
await driver.findElement(By.className('choice-input-button')).click()
// Wait for video to start
await driver.sleep(5000);
await driver.actions().keyDown(Key.ALT).keyDown(Key.COMMAND).keyDown(Key.SHIFT).sendKeys('\u2019').perform()
await driver.sleep(15000);
} finally {
await driver.quit();
}
})();
### Relevant log output
```shell
No log
Operating System
macOS Monteret
Selenium version
^4.8.0
What are the browser(s) and version(s) where you see this issue?
Chrome 110, Firefox 109
What are the browser driver(s) and version(s) where you see this issue?
geckodriver 0.32.0, ChromeDriver 109.0.5414.74
Are you using Selenium Grid?
No response
What happened?
Issue:
The keyboard shortcut on macOS to enable firefox picture-in-picture mode is
command + Shift + option + ]. In JavaScript these are dispatched as 3KeyboardEvents:'Meta/Command', 'Alt', 'Shift', 'β'. Theβkey is sent with a combination ofoption/alt+]. It is impossible to send this combination using WebDriver.Steps to reproduce:
await action.keyDown(Key.ALT).sendKeys(']').keyDown(Key.COMMAND).keyDown(Key.SHIFT).perform();Expected result:
Picture in picture launched in Firefox
A trusted KeyboardEvent is dispatched that looks like:
Actual events:
action.sendKeys(Key.ALT).sendKeys('β').perform()action.sendKeys(Key.ALT).sendKeys(']').perform()How can we reproduce the issue?
const { Builder, Key, By, until } = require('selenium-webdriver'); (async function example() { let driver = await new Builder().forBrowser('firefox').build(); try { await driver.get('http://developers.canal-plus.com/rx-player/'); await driver.wait(until.elementLocated(By.className('choice-input-button')), 10000); // To see the event in the console await driver.executeScript(() => { window.addEventListener('keydown', (e) => { console.log(e); }); }); await driver.findElement(By.className('choice-input-button')).click() // Wait for video to start await driver.sleep(5000); await driver.actions().keyDown(Key.ALT).keyDown(Key.COMMAND).keyDown(Key.SHIFT).sendKeys('\u2019').perform() await driver.sleep(15000); } finally { await driver.quit(); } })();Operating System
macOS Monteret
Selenium version
^4.8.0
What are the browser(s) and version(s) where you see this issue?
Chrome 110, Firefox 109
What are the browser driver(s) and version(s) where you see this issue?
geckodriver 0.32.0, ChromeDriver 109.0.5414.74
Are you using Selenium Grid?
No response