upload test fixed

This commit is contained in:
Guillem Hernandez Sola
2026-04-23 13:25:13 +02:00
parent 98b34c5434
commit 5cbbca59d0

View File

@@ -16,7 +16,7 @@ public class UploadTest extends BaseTest {
public void testApp() throws InterruptedException { public void testApp() throws InterruptedException {
driver.navigate().to("https://the-internet.herokuapp.com/upload"); driver.navigate().to("https://the-internet.herokuapp.com/upload");
WebElement fileUpload = driver.findElement(By.id("file-upload")); WebElement fileUpload = driver.findElement(By.id("file-upload"));
File file = new File("src" + File.separator + "main" File file = new File("src" + File.separator + "test"
+ File.separator + "resources" + File.separator + "2-logo-B_activa.png"); + File.separator + "resources" + File.separator + "2-logo-B_activa.png");
fileUpload.sendKeys(file.getAbsolutePath()); fileUpload.sendKeys(file.getAbsolutePath());
WebElement buttonUpload = driver.findElement(By.id("file-submit")); WebElement buttonUpload = driver.findElement(By.id("file-submit"));