-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHomepageTestTest.java
More file actions
51 lines (51 loc) · 1.8 KB
/
HomepageTestTest.java
File metadata and controls
51 lines (51 loc) · 1.8 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
50
51
// Generated by Selenium IDE
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Alert;
import org.openqa.selenium.Keys;
import java.util.*;
import java.net.MalformedURLException;
import java.net.URL;
public class HomepageTestTest {
private WebDriver driver;
private Map<String, Object> vars;
JavascriptExecutor js;
@Before
public void setUp() {
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
@After
public void tearDown() {
driver.quit();
}
@Test
public void homepageTest() {
driver.get("http://localhost:8080/Assignment/homepage.php");
driver.manage().window().setSize(new Dimension(1382, 744));
driver.findElement(By.linkText("Post Project")).click();
driver.findElement(By.linkText("About")).click();
driver.findElement(By.linkText("Contact")).click();
driver.findElement(By.linkText("Join")).click();
driver.findElement(By.cssSelector(".progimg img")).click();
driver.findElement(By.cssSelector(".graimg img")).click();
driver.findElement(By.cssSelector(".dataimg img")).click();
}
}