blob: 26e9c773551ea3f74e8caf1487573545defb7c9c (
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
|
<?php
class ButtonTestCase extends SeleniumTestCase
{
function test ()
{
$this->open("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&functionaltest=true", "");
$this->verifyTitle("PRADO QuickStart Sample", "");
// a regular button
$this->clickAndWait("//input[@type='submit' and @value='text']", "");
// a click button
$this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
$this->clickAndWait("//input[@type='submit' and @value='click me']", "");
$this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
// a command button
$this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]");
$this->clickAndWait("//input[@type='submit' and @value='click me']", "");
$this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]");
// a button causing validation
$this->verifyNotVisible('ctl0_body_ctl3');
$this->click("//input[@type='submit' and @value='submit']", "");
$this->pause(1000);
$this->verifyVisible('ctl0_body_ctl3');
$this->type("ctl0\$body\$TextBox", "test");
$this->clickAndWait("//input[@type='submit' and @value='submit']", "");
$this->verifyNotVisible('ctl0_body_ctl3');
}
}
?>
|