Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailDamasheuski committed Aug 3, 2018
0 parents commit 819662c
Show file tree
Hide file tree
Showing 9 changed files with 445 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

354 changes: 354 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions BelAviaMinskRiga.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>BelAviaMinskRiga</groupId>
<artifactId>BelAviaMinskRiga</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.13.0</version>
</dependency>

</dependencies>

</project>
14 changes: 14 additions & 0 deletions src/main/java/pages/BasePage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;


public class BasePage {
protected WebDriver driver;

public BasePage(){
driver = new ChromeDriver();
}

}
19 changes: 19 additions & 0 deletions src/main/java/pages/MainPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class MainPage extends BasePage {

@FindBy(tagName = "input", id = "OriginLocation_Combobox")
private WebElement searchFieldFrom = driver.findElement(By.xpath(".//input[@id='OriginLocation_Combobox']"));
private WebElement searchFieldTo = driver.findElement(By.xpath(".//input[@id='DestinationLocation_Combobox']"));
private WebElement oneWayRadioButton = driver.findElement(By.xpath(".//label[text()='One-way']"));
private WebElement returnRadioButton = driver.findElement(By.xpath(".//label[text()='Return']"));
private WebElement calendarDepartureDate = driver.findElement(By.xpath(".//[@id='DepartureDate_Datepicker']"));
private WebElement calendarReturneDate = driver.findElement(By.xpath(".//[@id='ReturnDate_Datepicker']"));
private WebElement searchButton = driver.findElement(By.xpath(".//button[@type='submit' and text()='Search']"));


}
3 changes: 3 additions & 0 deletions src/main/resources/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
url=https://en.belavia.by/
search.term.minsk=Minsk (MSQ), BY
search.term.riga=Riga (RIX), LV

0 comments on commit 819662c

Please sign in to comment.