blob: 0f86216eff633b2f75b1db2c374cf78d02609768 (
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
|
<?php
class QuickstartImageButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
$this->url("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&notheme=true&lang=en");
$this->assertEquals("PRADO QuickStart Sample", $this->title());
// a click button
$this->byXPath("//input[@type='image' and @alt='hello world']")->click();
$this->assertContains("You clicked at ", $this->source());
// a command button
$this->byName("ctl0\$body\$ctl1")->click();
$this->assertContains("Command name: test, Command parameter: value", $this->source());
// a button causing validation
$this->assertNotVisible('ctl0_body_ctl2');
$this->byId("ctl0_body_ctl3")->click();
// $this->pause(1000);
$this->assertVisible('ctl0_body_ctl2');
$this->type("ctl0\$body\$TextBox", "test");
$this->byId("ctl0_body_ctl3")->click();
$this->assertNotVisible('ctl0_body_ctl2');
}
}
|