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
|
<?php
class ActiveListBoxTestCase extends SeleniumTestCase
{
function test()
{
$this->open("active-controls/index.php?page=ActiveListBoxTest");
$this->assertTextPresent('Active List Box Functional Test');
$this->assertText("label1", "Label 1");
$this->click("button1");
$this->pause(800);
$this->assertSelectedIndexes('list1', '1,2,3');
$this->click('button3');
$this->pause(800);
$this->assertSelectedIndexes('list1', '0');
$this->click('button4');
$this->pause(800);
$this->assertSelectedIndexes('list1', '4');
$this->click('button5');
$this->pause(800);
$this->assertSelectedIndexes('list1', '1,4');
$this->click('button2');
$this->pause(800);
$this->assertEmptySelection("list1");
$this->click('button7');
$this->pause(800);
$this->click("button1");
$this->pause(800);
$this->assertSelectedIndexes('list1', '3');
$this->click('button6');
$this->pause(800);
$this->click("button1");
$this->pause(800);
$this->assertSelectedIndexes('list1', '1,2,3');
$this->select("list1", "item 1");
$this->pause(800);
$this->assertText('label1', 'Selection: value 1');
$this->addSelection("list1", "item 4");
$this->pause(800);
$this->assertText('label1', 'Selection: value 1, value 4');
}
}
?>
|