Hello Sir/Madam,
Iam new to this Selenium Tool .Iam using this tool for web automation using Selenium RC-Php format.while running at the Command prompt Iam getting following:
C:\XAMPP\htdocs\selenium>phpunit home.php
PHPUnit 3.4.12 by Sebastian Bergmann.
F
Time: 8 seconds, Memory: 4.75Mb
There was 1 failure:
- home::testMyTestCase
Current URL: http://192.168.100.4/clientinterface/LoginError.aspx
Failed asserting that two strings are equal.
— Expected
+++ Actual
@@ @@
-Home Page
+Client Master Page
C:\XAMPP\htdocs\selenium\home.php:16
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
I have also included following Code:
<?php
require_once ‘PHPUnit/Extensions/SeleniumTestCase.php’;
class home extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser('*firefox');
$this->setBrowserUrl('http://192.168.100.4/clientinterface/ClientHomePage.aspx');
}
public function testMyTestCase()
{
$this->open('http://192.168.100.4/clientinterface/ClientHomePage.aspx');
$this->assertEquals("Home Page", $this->getTitle());
$this->click("ctl00_C1WebMenu1_int_i5_txt");
$this->waitForPageToLoad("30000");
$this->assertEquals("Contact CFCFS", $this->getTitle());
}
}
?>
Why there is Failure in executing this test at the command prompt?