forked from BugorDmitriy/OpenWeatherJavaProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindPage.java
More file actions
44 lines (29 loc) · 1.01 KB
/
Copy pathFindPage.java
File metadata and controls
44 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package pages;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import pages.base_abstract.FooterMenuPage;
import java.util.List;
public class FindPage extends FooterMenuPage<FindPage> {
@FindBy(id = "search_str")
private WebElement searchFieldWeatherInYourCity;
@FindBy(xpath = "//div[@id='forecast_list_ul']//tr")
private List<WebElement> resultRows;
@FindBy(xpath = "//div[@id='forecast_list_ul']//tr/td[2]/b[1]")
private List<WebElement> cityCountryNames;
public FindPage(WebDriver driver) {
super(driver);
}
public FindPage createGeneric() {
return new FindPage(getDriver());
}
public String getSearchFieldValue(String attribute) {
return getAttribute(searchFieldWeatherInYourCity, attribute);
}
public List<WebElement> getResultRows() {
return resultRows;
}
public List<String> getCityCountryNames() {
return getTexts(cityCountryNames);
}
}