-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchFromBestTest.java
More file actions
39 lines (33 loc) · 965 Bytes
/
SearchFromBestTest.java
File metadata and controls
39 lines (33 loc) · 965 Bytes
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
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
import pages.HomePage;
public class SearchFromBestTest {
private static Utils utils;
private static WebDriver driver;
private static WebDriverWait wait;
private static JavascriptExecutor js;
private static HomePage homePage;
@BeforeEach
public void setUp() {
utils = new Utils();
utils.setupDriver();
driver = utils.getDriver();
wait = utils.getWaitTime();
js = utils.getJsExecutor();
homePage = new HomePage(driver);
}
@AfterEach
public void tearDown() {
driver.quit();
}
@Test
public void searchFromBestTest() {
homePage.clickBestButton();
js.executeScript("window.scrollBy(0, 500)");
js.executeScript("window.scrollBy(0, -250)");
}
}