File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
108const width = 1200 ;
119const 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) {
You can’t perform that action at this time.
0 commit comments