שלום חברים
לפעמים שאנו עושים טסטים על אתרים מסוימיים אנחנו מקבלים כל מיני הודעות קופצות למניהם אם אנחנו רוצים אותם ומטפלים בהם אז אין שום בעיה אבל אם אנחנו רוצים לחסום אותם על מנת שלא יקריס לנו את ריצת האוטומציה מה שניתן לעשות זה להוסיף את שורות הקוד האלו לדרייבר
//Create a instance of ChromeOptions class
ChromeOptions options = new ChromeOptions();
//Add chrome switch to disable notification - "--disable-notifications"
options.addArguments("--disable-notifications");
//Set path for driver exe
System.setProperty("webdriver.chrome.driver","path/to/driver/exe");
//Pass ChromeOptions instance to ChromeDriver Constructor
WebDriver driver =new ChromeDriver(options);זהו זה יעשה כבר את העבודה



