forked from muhomorka/muhomorka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MuhomorkaTestContact.java
55 lines (35 loc) · 1.12 KB
/
MuhomorkaTestContact.java
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
52
53
54
55
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import static org.junit.Assert.assertEquals;
/**
* Created by tapetkov on 8/13/15.
*/
public class MuhomorkaTestContact {
private WebDriver selenium;
@Before
public void setUp (){
selenium = new FirefoxDriver();
}
@Test
public void TestEmail () {
selenium.get("http://mitove-i-legendi.net/Muhomorka.bg/");
WebElement facebook = selenium.findElement(By.className("facebook"));
facebook.click();
assertEquals("https://www.facebook.com/shrooms.bg", selenium.getCurrentUrl());
// Here I have to put command for close to new window.
selenium.get("http://mitove-i-legendi.net/Muhomorka.bg/");
WebElement email = selenium.findElement(By.className("email"));
email.click();
// Here I have to put command for close to new window.
}
//@After
public void CloseAll ()
{
selenium.close();
}
}