1
await page.waitForSelector('#msg5',{waitUntil: '#msg5', timeout: 0});

is my code

I want my selector to wait for either #msg5 or #msg1, What is the easiest method to achieve that?

The below is what I tried and it did not work

await page.waitForSelector(/'#msg5'|'#msg1'/,{waitUntil: /'#msg5'|'#msg1'/, timeout: 0});
  • see this: https://stackoverflow.com/questions/49946728/puppeteer-waitforselector-on-multiple-selectors – EugenSunic Feb 23 '20 at 01:14
  • It have multiple selectors there it do not answer how to pass the 'or' in selector I might be wrong because I am newbie – user3659679 Feb 23 '20 at 22:59

0 Answers0