summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Tickets/Ticket_21.php
blob: 7a9e351997345d9342098b39125bdb4c1d76b333 (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
<?php

class Ticket_21 extends TPage
{
	public function onLoad($param)
	{
		parent::onLoad($param);
		
		if(!$this->IsPostBack)
			$this->setViewState("clicks", 0);
	}

	public function doClick($sender, $param)
	{
		$clicks = $this->getViewState("clicks");
		$clicks++;
		$this->label1->setText("Radio button clicks: $clicks");
		$this->setViewState("clicks", $clicks);
	}
}

class Ticket_21_TestCase extends SeleniumTestCase
{
	function test()
	{
		$this->open(Prado::getApplication()->getTestPage(__FILE__));
		$this->assertTitle("Verifying Ticket 21");
		$this->clickAndWait("ctl0_Content_button1");
		$this->verifyTextPresent("Radio button clicks: 1", "");
		$this->click("ctl0_Content_button1");
		$this->verifyTextPresent("Radio button clicks: 1", "");

	}
}

?>