更新时间:2023-11-11 08:31:40
选择和导航承诺之间可能存在竞争条件(参见示例 此处 或 此处).你可以试试这个方法吗?
There may be a race condition between selecting and navigation promises (see examples here or here). Can you try this approach?
await Promise.all([
page.select('select[name=sort]', 'size'),
page.waitForNavigation(),
]);
await page.waitForSelector('select[name=sort]');