blob: 898c6ff3cf47b64e066eb51914d14fd9956c7b4c (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<?php
class ButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
$this->url('validators/index.php?page=Button');
// verify all error messages are invisible
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
$this->click("ctl0_Content_ctl1");
$this->assertVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
$this->assertTextNotPresent('Button1 is clicked');
$this->type("ctl0_Content_TextBox1", "test");
$this->clickAndWait("ctl0_Content_ctl1");
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
$this->assertTextPresent('Button1 is clicked and valid');
// verify the second validator shows the error
$this->click("ctl0_Content_ctl3");
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
$this->assertTextNotPresent('Button2 is clicked');
$this->type("ctl0_Content_TextBox2", "test");
$this->clickAndWait("ctl0_Content_ctl3");
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
$this->assertTextPresent('Button2 is clicked and valid');
// verify the third validator shows the error
$this->clickAndWait("ctl0_Content_ctl5");
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
$this->assertTextPresent('Button3 is clicked');
$this->assertTextNotPresent('Button3 is clicked and valid');
$this->type("ctl0_Content_TextBox3", "test");
$this->clickAndWait("ctl0_Content_ctl5");
$this->assertNotVisible('ctl0_Content_ctl0');
$this->assertNotVisible('ctl0_Content_ctl2');
$this->assertNotVisible('ctl0_Content_ctl4');
$this->assertTextPresent('Button3 is clicked and valid');
}
}
|