-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainTest.java
More file actions
36 lines (23 loc) · 1.02 KB
/
MainTest.java
File metadata and controls
36 lines (23 loc) · 1.02 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
import io.github.bonigarcia.wdm.WebDriverManager;
import org.junit.jupiter.api.*;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class MainTest extends BaseTest {
@Test
public void openPage() {
driver.get("https://www.olx.ba/");
WebElement ka = driver.findElement(By.id("km"));
Assertions.assertTrue(ka.isDisplayed());
ka.click();
WebElement umetnost = driver.findElement(By.cssSelector("#kd > ul > li:nth-child(10) > a"));
Assertions.assertTrue(umetnost.isDisplayed());
umetnost.click();
WebElement artikl = driver.findElement(By.cssSelector("#art_43868608 > div.naslov > a > p > i"));
Assertions.assertTrue(artikl.isDisplayed());
artikl.click();
WebElement izabranArtikl = driver.findElement(By.id("naslovartikla"));
Assertions.assertTrue(izabranArtikl.isDisplayed());
}
}