-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomePage.java
More file actions
49 lines (25 loc) · 1.36 KB
/
HomePage.java
File metadata and controls
49 lines (25 loc) · 1.36 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
45
46
47
48
49
package com.pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class HomePage {
WebDriver driver;
public HomePage(WebDriver driver){
this.driver=driver;
}
public By departureAirportTxt = By.name("Departure airport");
public By searchResultList = By.xpath("//div[@class='ts-fbr-option__price-detail']//strong[@class='ts-fbr-option__price']");
public By departureAirportList = By.xpath("//a[contains(@aria-label,'Dubai International Airport (DXB), Dubai, United Arab Emirates')]");
public By arrivalAirportTxt = By.name("Arrival airport");
public By arrivalAirportList = By.xpath("//a[contains(@aria-label,'London Heathrow Airport (LHR), London, United Kingdom')]");
public By continueBtn = By.xpath("//a[contains(@class,'cta cta--large cta--primary js-continue-search-flight search-flight__continue--cta')]");
public By datePicker = By.id("search-flight-date-picker--depart");
public By selectTravelDate(String date){
By selectTravelDate = By.xpath("//a[@aria-label="+"'"+date+"'"+"]");
return selectTravelDate;
}
public By selectReturnDate(String date){
By selectReturnDate = By.xpath("//a[@aria-label="+"'"+date+"'"+"]");
return selectReturnDate;
}
public By searchFlightsBtn = By.xpath("//button/span[text()='Search flights']");
}