diff --git a/model/forefront/index.ts b/model/forefront/index.ts index 9468b72..e1acd0f 100644 --- a/model/forefront/index.ts +++ b/model/forefront/index.ts @@ -87,11 +87,8 @@ export class Forefrontnew extends Chat { console.log('try save cookie'); console.log('save cookie successfully') } finally { - const se = await this.page.$('#model-select'); - if (se) { - await this.page.click('#model-select'); - await this.page.select('#model-select', 'gpt-4') - } + await this.page.waitForSelector('.absolute > .shadow > .w-full:nth-child(2) > .flex > .font-medium',{timeout:100000}); + await this.page.click('.absolute > .shadow > .w-full:nth-child(2) > .flex > .font-medium'); } console.log('try to find input'); await this.page.waitForSelector('.relative > .flex > .w-full > .text-th-primary-dark > div', { diff --git a/pool/puppeteer.ts b/pool/puppeteer.ts index 6b475e7..e6c25cf 100644 --- a/pool/puppeteer.ts +++ b/pool/puppeteer.ts @@ -14,7 +14,7 @@ export class FreeBrowser { constructor(id: string, options?: PuppeteerLaunchOptions) { this.options = { - userDataDir: path.join(runPath, id), + // userDataDir: path.join(runPath, id), ...options }; this.id = id;