I've figured it out finally. I found inside that same form an anchor element whose type was submit. I then clicked on it and the form was submitted.
Here's the code I've used:
const form = await page.$('a#topbar-search');
await form.evaluate( form => form.click() );
You can also use the $eval method instead of evaluate:
await page.$eval( 'a#topbar-search', form => form.click() );
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…