I am working with selenium automation and I am not able to upload file with relative path please see the below code.
driver.findElement(By.xpath("//span[text()='Theme']")).click();
File filepath=new File("\ntwinelogin.jpg");
WebElement fileobj = driver.findElement(By.name("toplogoupload"));
fileobj.sendKeys("\ntwinelogin.jpg");
String Filepath=filepath.getAbsolutePath();
Filepath.trim();