-
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.7-Casos Uso VistaPrivada.
- Loading branch information
1 parent
b1b8e4d
commit 77f7f7e
Showing
2 changed files
with
143 additions
and
0 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
27 changes: 27 additions & 0 deletions
27
src/test/java/com/uniovi/sdi/pageobjects/PO_PrivateView.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,27 @@ | ||
package com.uniovi.sdi.pageobjects; | ||
|
||
import com.uniovi.sdi.util.SeleniumUtils; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.support.ui.Select; | ||
|
||
public class PO_PrivateView extends PO_NavView { | ||
static public void fillFormAddMark(WebDriver driver, int userOrder, String descriptionp, String scorep) | ||
{ | ||
//Esperamos 5 segundo a que carge el DOM porque en algunos equipos falla | ||
SeleniumUtils.waitSeconds(driver, 5); | ||
//Seleccionamos el alumnos userOrder | ||
new Select(driver.findElement(By.id("user"))).selectByIndex(userOrder); | ||
//Rellenemos el campo de descripción | ||
WebElement description = driver.findElement(By.name("description")); | ||
description.clear(); | ||
description.sendKeys(descriptionp); | ||
WebElement score = driver.findElement(By.name("score")); | ||
score.click(); | ||
score.clear(); | ||
score.sendKeys(scorep); | ||
By boton = By.className("btn"); | ||
driver.findElement(boton).click(); | ||
} | ||
} |