Selenium WebDriver not able to handle file upload dialog in Angular application on Chrome 120
I'm dealing with I'm prototyping a solution and I'm working with an scenario where Selenium WebDriver want to interact with the file upload dialog in my Angular application while running tests on Chrome 120. My setup includes Selenium 4.0.0 with Java bindings. I have a file input element that triggers a file dialog when clicked, but the WebDriver seems to bypass this dialog entirely. Here's the relevant snippet of my test code: ```java WebDriver driver = new ChromeDriver(); driver.get("https://example.com/upload"); WebElement uploadButton = driver.findElement(By.id("file-upload")); uploadButton.click(); // At this point, the file dialog opens, but Selenium want to interact with it. ``` I tried using `AutoIt` and `Robot` class to handle the file picker, but neither seems to work consistently across different environments. Additionally, I have the following capabilities set up: ```java ChromeOptions options = new ChromeOptions(); options.addArguments("--start-maximized"); options.setExperimentalOption("excludeSwitches", new String[] {"enable-automation"}); ``` I also ensured that the file path is correct, but the dialog fails to accept the input. When I try to automate the file upload with `Robot`, it throws an exception saying "want to locate file". Iβve double-checked the file path in the script and itβs correct. Has anyone encountered a similar scenario with handling file upload dialogs in Selenium, particularly with Angular applications? Any insights on how to properly handle this would be greatly appreciated as Iβm exploring on this scenario. For reference, this is a production service. Thanks in advance!