blob: 5899a6baae0af90bedb15306e8bd5137183bdabd (
plain)
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
|
<?php
class ActiveDropDownListTestCase extends SeleniumTestCase
{
function test()
{
$this->open("active-controls/index.php?page=ActiveDropDownList");
$this->assertTextPresent('Active Drop Down List Test Case');
$this->assertText("label1", "Label 1");
$this->click("button1");
$this->pause(800);
$this->assertSelected("list1", "item 4");
$this->click("button2");
$this->pause(800);
$this->assertEmptySelection("list1");
$this->click("button3");
$this->pause(800);
$this->assertSelected("list1", "item 2");
// due to clearing selection and then updating the selection
// otherwise it should not fire the changed event (fired by js because of change to options).
$this->assertText("label1", "Label 1");
$this->select("list1", "item 1");
$this->pause(800);
$this->select("list2", "value 1 - item 4");
$this->pause(800);
$this->assertText("label1", "Selection 2: value 1 - item 4");
$this->select("list1", "item 3");
$this->pause(800);
$this->select("list2", "value 3 - item 5");
$this->pause(800);
$this->assertText("label1", "Selection 2: value 3 - item 5");
$this->click('button4');
$this->pause(800);
$this->assertSelected('list1', 'item 3');
$this->pause(300);
$this->assertSelected('list2', 'value 3 - item 3');
}
}
?>
|