How can I disable Chrome notifications during desktop browser automation tests on LambdaTest?

How can I disable Chrome notifications during desktop browser automation tests on LambdaTest?

Hi Dipen,

To disable Chrome notifications in your automation tests on LambdaTest, you can use ChromeOptions in your code:

ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-notifications");

Ensure that you instantiate your WebDriver with these options:

WebDriver driver = new ChromeDriver(options);