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 AutoCompleteTestCase extends SeleniumTestCase
{
function test()
{
$this->disabled();
$this->skipBrowsers(self::INTERNET_EXPLORER);
$this->open("active-controls/index.php?page=AutoCompleteTest");
$this->verifyTextPresent("TAutoComplete Test");
$this->assertText("label1", "Label 1");
$this->keyPress("textbox3", 'a');
$this->pause(1000);
$this->verifyTextPresent('Andorra');
$this->keyPress("textbox3", 'u');
$this->pause(1000);
$this->verifyTextPresent('Australia');
$this->click("heading"); //click somewhere else.
$this->pause(800);
$this->assertText("label1", "suggestion for au");
$this->click("css=#textbox3_result ul li");
$this->pause(800);
$this->assertText("label1", "Label 1: Austria");
$this->keyPress("textbox2", "c");
$this->pause(800);
$this->keyPress("textbox2", "u");
$this->pause(800);
$this->click('css=#textbox2_result ul li');
$this->pause(800);
$this->assertText("label1", "Label 1: Cuba");
$this->keyPress("textbox2", ",");
$this->keyPress("textbox2", "m");
$this->pause(800);
$this->keyPress("textbox2", "e");
$this->pause(800);
$this->click('css=#textbox2_result ul li');
$this->pause(800);
$this->assertText("label1", "Label 1: Cuba,Mexico");
}
}
?>
|