Skip to content

Commit

Permalink
fix(forefront): multi select
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangsx committed Jun 8, 2023
1 parent a3cf402 commit 3489d6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions model/forefront/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export class Forefrontnew extends Chat {
}

private static async selectAssistant(page: Page) {
await page.waitForSelector('div > .absolute > .relative > .w-full:nth-child(3) > .relative')
await page.click('div > .absolute > .relative > .w-full:nth-child(3) > .relative')
await page.hover('div > .absolute > .relative > .w-full:nth-child(3) > .relative')
// click assistant select
await page.waitForSelector('.px-4 > .flex > .grid > .h-9 > .grow')
await page.click('.px-4 > .flex > .grid > .h-9 > .grow')
Expand Down Expand Up @@ -176,8 +179,7 @@ export class Forefrontnew extends Chat {
// click never internet
await page.waitForSelector('.flex > .p-1 > .relative')
await page.click('.flex > .p-1 > .relative')
await this.selectAssistant(page);
await Forefrontnew.switchToGpt4(page, triedTimes);
await Forefrontnew.selectAssistant(page);
console.log('switch gpt4 ok!')
} catch (e) {
console.log(e);
Expand Down Expand Up @@ -271,6 +273,7 @@ export class Forefrontnew extends Chat {
return {text: pt.stream};
}
try {
await Forefrontnew.selectAssistant(page);
console.log('try to find input');
await page.waitForSelector('.relative > .flex > .w-full > .text-th-primary-dark > div', {
timeout: 10000,
Expand Down

0 comments on commit 3489d6d

Please sign in to comment.