fix selectors

This commit is contained in:
romanov73 2018-02-17 11:33:44 +04:00
parent d9b601b291
commit b35147f197
2 changed files with 5 additions and 12 deletions

View File

@ -1,15 +1,11 @@
import context.ChromeContext; import context.ChromeContext;
import context.Context; import context.Context;
import context.FirefoxContext;
import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.openqa.selenium.Dimension; import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
import page.SearchPage; import page.SearchPage;

View File

@ -1,21 +1,18 @@
package page; package page;
import java.util.List;
import org.openqa.selenium.By; import org.openqa.selenium.By;
import org.openqa.selenium.Keys; import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement; import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.FindBys;
public class SearchPage { public class SearchPage {
WebDriver driver; WebDriver driver;
@FindBy(xpath = "/html/body/div[1]/header/div/div[2]/div/div/div/form/label/input[1]") @FindBy(css = "input.header-search-input")
private WebElement inputField; private WebElement inputField;
@FindBy(xpath = "//*[@id=\"js-pjax-container\"]/div/div[1]/div[1]/nav/a[7]/span") @FindBy(xpath = "//*[@class='menu border']/a[7]")
private WebElement usersLink; private WebElement usersLink;
public SearchPage(WebDriver driver) { public SearchPage(WebDriver driver) {