While automating the upload file feature in selenium using Java, the control is not going to the file according to the file path I have provided. Why is the control not reaching to the file properly?
My code
uploadWebElement.click();
(new Actions(DriverConfiguration.driver())).sendKeys(new CharSequence[]{filePath, Keys.ENTER}).perform();
Error
The problem is when I clicked for browse, it opens the desktop folder and the one where I saved the file, is not reaching through this.