Selenium WebDriver hangs indefinitely when interacting with an Angular Material tooltip in Chrome 120
This might be a silly question, but After trying multiple solutions online, I still can't figure this out. I'm stuck on something that should probably be simple. I'm working with an scenario where my Selenium WebDriver test hangs indefinitely whenever I try to interact with a tooltip created using Angular Material in a web application. The tooltip appears when I hover over an element, but the WebDriver doesn't seem to recognize it as a visible element, causing the script to stall. I'm using Chrome 120 along with the latest version of ChromeDriver. My test automation is set up using the Selenium Java bindings. Iβve tried waiting for the tooltip to become visible using both implicit and explicit waits, but nothing seems to work. Hereβs a snippet of my code: ```java WebDriver driver = new ChromeDriver(); driver.get("https://example.com"); WebElement element = driver.findElement(By.id("my-element")); Actions actions = new Actions(driver); actions.moveToElement(element).perform(); // Wait for the tooltip to become visible WebDriverWait wait = new WebDriverWait(driver, 10); WebElement tooltip = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("mat-tooltip"))); // Attempt to click the tooltip tooltip.click(); ``` When I run the test, I receive the following behavior message after a timeout: `org.openqa.selenium.TimeoutException: Timed out after 10 seconds waiting for visibility of element located by By.className: mat-tooltip`. Iβve confirmed that the tooltip does appear on the UI when I hover over the element, but the WebDriver seems unable to interact with it. I also tried adding a sleep before trying to locate the tooltip, but the scenario continues. Is there a known workaround or best practice for handling tooltips in Angular Material applications using Selenium? Any help would be greatly appreciated! Am I missing something obvious? Any pointers in the right direction? Thanks for your help in advance!