adspace
Answer Posted / Vinay Vishal
To upload a file in Selenium WebDriver, use the `SendKeys` function to enter the path of the file as if it were typed manually into the file input field. Here's an example:nn`driver.findElement(By.id("file-input")).sendKeys("/path/to/your/file.txt");`
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers