-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathManageAssignments_207.java
42 lines (30 loc) · 1.14 KB
/
ManageAssignments_207.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
package unitn.sectest;
import net.sourceforge.jwebunit.api.IElement;
import net.sourceforge.jwebunit.htmlunit.HtmlUnitElementImpl;
import net.sourceforge.jwebunit.junit.WebTester;
import org.junit.Before;
import org.junit.Test;
import org.xml.sax.helpers.AttributesImpl;
import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.InputElementFactory;
public class ManageAssignments_207 {
private WebTester tester;
@Before
public void setup(){
tester = new WebTester();
tester.setBaseUrl("http://localhost/schoolmate");
}
@Test
public void test1(){
tester.beginAt("index.php");
tester.setTextField("username", "Jack");
tester.setTextField("password", "password@1");
tester.submit();
tester.assertMatch("Jack Porter's Classes");
tester.clickLinkWithText("Security Testing");
tester.assertMatch("Class Settings");
tester.clickLinkWithText("Assignments");
tester.assertMatch("Manage Assignments");
}
}