diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index e4c0d89b..e5acba7c 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -774,7 +774,7 @@ export class DialogKeywords { await sleep(DEFAULT_HEAR_POLL_INTERVAL); } - const answer = min. cbMap[userId].promise; + const answer = min.cbMap[userId].promise; if (!kind) { result = answer; diff --git a/packages/basic.gblib/services/SystemKeywords.ts b/packages/basic.gblib/services/SystemKeywords.ts index 1fb57d6c..39cd3bdc 100644 --- a/packages/basic.gblib/services/SystemKeywords.ts +++ b/packages/basic.gblib/services/SystemKeywords.ts @@ -475,7 +475,7 @@ export class SystemKeywords { // Handles calls for HTML stuff - if (handle) { + if (handle && WebAutomationServices.isSelector(file)) { GBLog.info(`BASIC: Web automation SET ${file}' to '${address}' . `); await new WebAutomationServices().setElementText({ pid, handle, selector: file, text: address }); @@ -718,7 +718,7 @@ export class SystemKeywords { page = WebAutomationServices.getPageByHandle(handle); } - if (page['$eval'] && (file.startsWith('.') || file.startsWith('#'))) { + if (page['$eval'] && WebAutomationServices.isSelector(file)) { const container = page['frame'] ? page['frame'] : page; const originalSelector = file; diff --git a/packages/basic.gblib/services/WebAutomationServices.ts b/packages/basic.gblib/services/WebAutomationServices.ts index 829b3365..7be0d6b2 100644 --- a/packages/basic.gblib/services/WebAutomationServices.ts +++ b/packages/basic.gblib/services/WebAutomationServices.ts @@ -52,18 +52,11 @@ import { SystemKeywords } from './SystemKeywords.js'; * Web Automation services of conversation to be called by BASIC. */ export class WebAutomationServices { - /** - * The number used in this execution for HEAR calls (useful for SET SCHEDULE). - */ - hrOn: string; - - debugWeb: boolean; - lastDebugWeb: Date; - - /** - * SYSTEM account maxLines,when used with impersonated contexts (eg. running in SET SCHEDULE). - */ - maxLines: number = 2000; + static isSelector(name: any) { + return name.startsWith('.') || name.startsWith('#'); + } + private debugWeb: boolean; + private lastDebugWeb: Date; public static cyrb53 = (str, seed = 0) => { let h1 = 0xdeadbeef ^ seed, @@ -347,6 +340,7 @@ export class WebAutomationServices { * @example SET page,"selector","text" */ public async setElementText({ pid, handle, selector, text }) { + text = `${text}`; const page = WebAutomationServices.getPageByHandle(handle); GBLog.info(`BASIC: Web Automation TYPE on ${selector}: ${text}.`); const e = await this.getBySelector({ handle, selector });