From 32dfd8233520261483bdf30f23425e3b50f05d17 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 28 Feb 2014 10:39:25 +0100 Subject: Ported all tests from Selenium1 (RC) to Selenium2 (WebDriver) using a compatibility layer (cherry picked from commit 82774aa0a41562a325f31c901584ec01c8238573) Conflicts: tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php tests/FunctionalTests/tickets/tests/Ticket220TestCase.php tests/FunctionalTests/tickets/tests/Ticket719TestCase.php tests/FunctionalTests/tickets/tests/Ticket769TestCase.php tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php --- .../quickstart/Controls/DataGrid3TestCase.php | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php') diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php index 2cdace20..0b24e2f5 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php @@ -1,18 +1,18 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en"); // verify the 2nd row of data - $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); - $this->verifyTextPresent("Addison-Wesley Professional", ""); - $this->verifyTextPresent("$47.04", ""); + $this->assertTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); + $this->assertTextPresent("Addison-Wesley Professional", ""); + $this->assertTextPresent("$47.04", ""); $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked'); $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); - //$this->verifyElementPresent("//img[@src='images/star5.gif']",''); + //$this->assertElementPresent("//img[@src='images/star5.gif']",''); // edit the 2nd row $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl7", ""); @@ -24,27 +24,26 @@ class QuickstartDataGrid3TestCase extends PradoGenericSeleniumTest $this->clickAndWait("link=Save", ""); // verify the 2nd row is saved - $this->verifyTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", ""); - $this->verifyTextPresent("Addison Wesley Professional", ""); - $this->verifyTextPresent("$57.04", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl2_ctl4").hasAttribute("checked")'), 'false'); + $this->assertTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", ""); + $this->assertTextPresent("Addison Wesley Professional", ""); + $this->assertTextPresent("$57.04", ""); + $this->verifyAttribute("ctl0_body_DataGrid_ctl2_ctl4@checked", null); $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); - //$this->verifyElementPresent("//img[@src='images/star1.gif']",''); + //$this->assertElementPresent("//img[@src='images/star1.gif']",''); // verify cancel editting the 3rd row $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl7", ""); $this->clickAndWait("link=Cancel", ""); - $this->verifyTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); + $this->assertTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); // verify deleting $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl9", ""); $this->verifyConfirmation("Are you sure?"); - $this->verifyTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); + $this->assertTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); - $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); - $this->chooseCancelOnNextConfirmation(); + $this->assertTextPresent("Extreme Programming Explained : Embrace Change",''); $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", ""); - $this->verifyConfirmation("Are you sure?"); - $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); + $this->verifyConfirmationDismiss("Are you sure?"); + $this->assertTextPresent("Extreme Programming Explained : Embrace Change",''); } } -- cgit v1.2.3