Skip to content

Commit

Permalink
- update
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanAksionau committed Aug 17, 2023
1 parent 7504adf commit 39fac19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/com/ea/springbasic/pages/LoginPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.ea.springbasic.pages.annotation.Page;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;

@Page
public class LoginPage extends BasePage {
Expand All @@ -22,7 +23,12 @@ public class LoginPage extends BasePage {
@FindBy(xpath = "//button//span[@class='show']")
private WebElement showButton;

@FindBy(xpath = "//button[contains(text(),'Accept all')]")
private WebElement acceptCookiesButton;

public void login(String email, String password) {
fluentWait.until(ExpectedConditions.elementToBeClickable(acceptCookiesButton));
acceptCookiesButton.click();
customerEmailInput.sendKeys(email);
this.passwordInput.sendKeys(password);
fluentWait.until((d) -> submitButton.getAttribute("aria-disabled").equals("false"));
Expand Down

0 comments on commit 39fac19

Please sign in to comment.