add checkbox to disable speechtotext

This commit is contained in:
2022-09-28 09:40:54 +02:00
parent f479514a99
commit c0119830f4
7 changed files with 24 additions and 18 deletions
+7 -4
View File
@@ -57,7 +57,7 @@ function log(message) {
}
class CommandorPage {
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE) {
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false) {
this.contact = contact;
this.device = device;
this.mongoManager = mongoManager;
@@ -65,6 +65,7 @@ class CommandorPage {
this.choosedStore = selectedStore
this.isFillingFields = false;
this.isTerminated = false;
this.audioAnalyse = audioAnalyse;
}
@@ -294,7 +295,9 @@ class CommandorPage {
let content = await currentPage.content();
let captcha_url = "geo.captcha-delivery.com/captcha";
if (content.toString().includes(captcha_url)) {
await this.checkAudioBtn();
if (this.audioAnalyse) {
await this.checkAudioBtn();
}
for (let i = 0; i < 15; i++) {
await delay(1000)
shell.beep()
@@ -325,8 +328,8 @@ class CommandorPage {
if (audioBtn) {
log("audioBtn found")
audioBtn.click()
let captchSolver = new GeoCaptchaSolver(this.page)
captchSolver.solve()
let captchaSolver = new GeoCaptchaSolver(this.page)
await captchaSolver.solve()
} else {
log("audioBtn not found")
}