Skip to content

Commit 2eb4b1a

Browse files
committed
Improve types
1 parent f7b8079 commit 2eb4b1a

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

test/smoke/src/vscode/puppeteer-driver.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
const puppeteer = require('puppeteer');
7-
8-
// export function connect(outPath: string, handle: string): Promise<{ client: IDisposable, driver: IDriver }>
6+
import * as puppeteer from 'puppeteer';
97

108
const width = 1200;
119
const height = 800;
@@ -16,7 +14,7 @@ const vscodeToPuppeteerKey = {
1614
enter: 'Enter'
1715
};
1816

19-
function buildDriver(browser, page) {
17+
function buildDriver(browser: puppeteer.Browser, page: puppeteer.Page): IDriver {
2018
return {
2119
_serviceBrand: undefined,
2220
getWindowIds: () => {
@@ -36,11 +34,10 @@ function buildDriver(browser, page) {
3634
keysDown.push(keys[i]);
3735
}
3836
while (keysDown.length > 0) {
39-
await page.keyboard.up(keysDown.pop());
37+
await page.keyboard.up(keysDown.pop()!);
4038
}
4139
},
4240
click: async (windowId, selector, xoffset, yoffset) => {
43-
console.log('click');
4441
const { x, y } = await page.evaluate(`
4542
(function() {
4643
function convertToPixels(element, value) {

0 commit comments

Comments
 (0)