How to handle microphone pop-up on Chrome in JUnit framework?

How to handle microphone pop-up on Chrome in JUnit framework?

Hello Emma,

Please use this script to allow microphone pop-up:

driver.get("https://www.onlinemictest.com/");
    Thread.sleep(3000);
    driver.findElement(By.xpath("//a[@id='start-test']")).click();
    Thread.sleep(2000);