Fix Click unit tests on Mac OS X
This patch brings screenDPI back in clicking equation, which was
regressed in afb096cfd7
.
This commit is contained in:
parent
b77ae4b77c
commit
60621b8815
@ -512,8 +512,8 @@ class Page extends EventEmitter {
|
||||
try {
|
||||
const nodeId = await this._querySelector(selector);
|
||||
let boxModel = (await this._client.send('DOM.getBoxModel', { nodeId })).model.content;
|
||||
let x = Math.round((boxModel[0] + boxModel[4]) / 2);
|
||||
let y = Math.round((boxModel[1] + boxModel[5]) / 2);
|
||||
let x = Math.round((boxModel[0] + boxModel[4]) / (2 * this._screenDPI));
|
||||
let y = Math.round((boxModel[1] + boxModel[5]) / (2 * this._screenDPI));
|
||||
|
||||
this._client.send('Input.dispatchMouseEvent', {
|
||||
type: 'mouseMoved',
|
||||
|
Loading…
Reference in New Issue
Block a user