Skip to content

Instantly share code, notes, and snippets.

@shriyaRam
Last active June 23, 2020 09:29
Show Gist options
  • Save shriyaRam/67f21e1ee03da7890bc79683f7b82772 to your computer and use it in GitHub Desktop.
Save shriyaRam/67f21e1ee03da7890bc79683f7b82772 to your computer and use it in GitHub Desktop.
await page.select('#phone_route_voice_handler', 'relay_agora').then(async()=>{ console.log("SUCCESS!")}).catch(()=>{console.log("FAILED TO SELECT AGORA CONNECTOR")});
await page.select("select#phone_route_call_agora_connector_id", req.body.connectorname)
const input = await page.$('#phone_route_call_agora_channel');
await input.click({ clickCount: 3 })
await input.type(req.body.channel);
await page.$eval('input[name=commit]', el => el.click()).then(async()=>{ await page.waitForNavigation({waitUntil: 'load'})}).catch(()=>{console.log("SUCCESS")});;
await browser.close();
reply += "Call on: " + ans;
await res.send(reply);
await setTimeout((function() {
return process.exit(22);
}), 1000);
};
main();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment