@@ -20,7 +20,7 @@ export async function sleep(timeout: number) {
20
20
* @param timeout The timeout in milliseconds (Optional)
21
21
* @returns Promise<WebElement> Returns the element found
22
22
*/
23
- export async function waitForElement ( webview : WebviewView , locator : By , timeout ? : number ) : Promise < WebElement > {
23
+ export async function waitForElement ( webview : WebviewView , locator : By , timeout : number = 8000 ) : Promise < WebElement > {
24
24
const driver = webview . getDriver ( )
25
25
await driver . wait ( until . elementsLocated ( locator ) , timeout )
26
26
return await webview . findWebElement ( locator )
@@ -33,7 +33,11 @@ export async function waitForElement(webview: WebviewView, locator: By, timeout?
33
33
* @param timeout The timeout in milliseconds (Optional)
34
34
* @returns Promise<WebElement[]> Returns an array of elements found
35
35
*/
36
- export async function waitForElements ( webview : WebviewView , locator : By , timeout ?: number ) : Promise < WebElement [ ] > {
36
+ export async function waitForElements (
37
+ webview : WebviewView ,
38
+ locator : By ,
39
+ timeout : number = 8000
40
+ ) : Promise < WebElement [ ] > {
37
41
const driver = webview . getDriver ( )
38
42
await driver . wait ( until . elementsLocated ( locator ) , timeout )
39
43
return await webview . findWebElements ( locator )
@@ -91,7 +95,7 @@ export async function writeToChat(prompt: string, webview: WebviewView, send = t
91
95
* @param timeout The timeout in milliseconds
92
96
* @returns Promise<boolean> True if a response was detected, false if timeout occurred
93
97
*/
94
- export async function waitForChatResponse ( webview : WebviewView , timeout = 15000 ) : Promise < boolean > {
98
+ export async function waitForChatResponse ( webview : WebviewView , timeout = 8000 ) : Promise < boolean > {
95
99
const startTime = Date . now ( )
96
100
97
101
while ( Date . now ( ) - startTime < timeout ) {
0 commit comments