-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDI-2122-713-5.6-Casos Uso VistaLogin.
- Loading branch information
1 parent
3197880
commit b1b8e4d
Showing
2 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/java/com/uniovi/sdi/pageobjects/PO_LoginView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.uniovi.sdi.pageobjects; | ||
|
||
import com.uniovi.sdi.util.SeleniumUtils; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import java.util.List; | ||
|
||
public class PO_LoginView extends PO_NavView{ | ||
static public void fillLoginForm(WebDriver driver, String dnip, String passwordp) { | ||
WebElement dni = driver.findElement(By.name("username")); | ||
dni.click(); | ||
dni.clear(); | ||
dni.sendKeys(dnip); | ||
WebElement password = driver.findElement(By.name("password")); | ||
password.click(); | ||
password.clear(); | ||
password.sendKeys(passwordp); | ||
By boton = By.className("btn"); | ||
driver.findElement(boton).click(); | ||
} | ||
} |