summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
committerctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
commit74b31be9515eddfa63005d6760614badfaba9fea (patch)
tree47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests
parent2b11341614ac4a15be697fa8acad07055154ac54 (diff)
parent0c5026b55cde5c104f10686afd8b441568175d38 (diff)
Merge pull request #530 from pradosoft/prado-3.2.43.2.4prado-3.2
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests')
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page11
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page9
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page8
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page2
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page11
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page9
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/Calculator.page18
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/Callback.page14
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page4
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page15
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page9
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page7
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page17
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page4
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/FeatureList.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/GerTurno2.page7
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page18
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/Layout.php5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/Layout.tpl38
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page15
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/NullStateTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page11
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page13
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/RatingList.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page8
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page12
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page9
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page5
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page6
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/config.xml5
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php32
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php53
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php179
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php41
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php42
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php43
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php28
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php63
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php57
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CalculatorTestCase.php29
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php66
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php19
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php27
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PopulateListTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php88
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php21
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php17
-rwxr-xr-xtests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php310
-rwxr-xr-xtests/FunctionalTests/features/protected/controls/Layout.tpl1
-rwxr-xr-xtests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php18
-rwxr-xr-xtests/FunctionalTests/features/tests/MyTestCase.php6
-rwxr-xr-xtests/FunctionalTests/issues/assets/.gitignore2
-rwxr-xr-xtests/FunctionalTests/issues/index.php6
-rwxr-xr-xtests/FunctionalTests/issues/protected/application.xml12
-rwxr-xr-xtests/FunctionalTests/issues/protected/controls/Layout.php6
-rwxr-xr-xtests/FunctionalTests/issues/protected/controls/Layout.tpl32
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue504.page14
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue504.php14
-rw-r--r--tests/FunctionalTests/issues/protected/pages/Issue516.page50
-rw-r--r--tests/FunctionalTests/issues/protected/pages/Issue516.php115
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue524.page7
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue524.php20
-rwxr-xr-xtests/FunctionalTests/issues/protected/runtime/.gitignore2
-rwxr-xr-xtests/FunctionalTests/issues/tests/Issue504TestCase.php16
-rw-r--r--tests/FunctionalTests/issues/tests/Issue516TestCase.php37
-rwxr-xr-xtests/FunctionalTests/issues/tests/Issue524TestCase.php20
-rwxr-xr-xtests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php32
-rwxr-xr-xtests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php69
-rwxr-xr-xtests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php12
-rwxr-xr-xtests/FunctionalTests/quickstart/Advanced/I18N.php86
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php38
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ButtonTestCase.php30
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php40
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php56
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php36
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php56
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php66
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php34
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php166
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php68
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataList1TestCase.php26
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataList2TestCase.php74
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php62
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php8
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php6
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php16
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php24
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ImageTestCase.php16
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/LabelTestCase.php18
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php28
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php79
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php34
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/PagerTestCase.php82
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/PanelTestCase.php18
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php40
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php64
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php32
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php48
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php32
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/StatementsTestCase.php8
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php52
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/TableTestCase.php18
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php72
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php24
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php24
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php40
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php36
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php30
-rwxr-xr-xtests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php50
-rwxr-xr-xtests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php1
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php7
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Layout.tpl9
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket220.page4
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket290.page9
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket586.page1
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl9
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket659.php5
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php10
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket719.page3
-rwxr-xr-x[-rw-r--r--]tests/FunctionalTests/tickets/protected/pages/ToggleTest.page0
-rwxr-xr-x[-rw-r--r--]tests/FunctionalTests/tickets/protected/pages/ToggleTest.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Issue120TestCase.php12
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Issue216TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket121TestCase.php16
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket163TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket169TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket191TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket205TestCase.php28
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket207TestCase.php26
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket21TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket220TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket225TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket227TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket239TestCase.php72
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket246TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket274TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket278TestCase.php20
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket27TestCase.php16
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket284TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket285TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket28TestCase.php12
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket290TestCase.php21
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket433TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket439TestCase.php11
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket463TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket470TestCase.php18
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket477TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket488TestCase.php39
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket504TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket507TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket521TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket526TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket528TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket535TestCase.php30
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket538TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket54TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket573TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket578TestCase.php21
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket585TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket586TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket587TestCase.php13
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket592TestCase.php46
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket595TestCase.php32
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket622TestCase.php17
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket653TestCase.php6
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket656TestCase.php19
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket659TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket660TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket669TestCase.php68
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket670TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket671TestCase.php40
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php34
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket679TestCase.php30
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket691TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket698TestCase.php12
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket700TestCase.php96
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket703TestCase.php17
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket708TestCase.php22
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket719TestCase.php35
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket722TestCase.php34
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket72TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket745TestCase.php13
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket769TestCase.php25
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket785TestCase.php24
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket823TestCase.php8
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket828TestCase.php32
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket849TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket876TestCase.php24
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket886TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket897TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket900TestCase.php14
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket922TestCase.php10
-rwxr-xr-xtests/FunctionalTests/tickets/tests/Ticket93TestCase.php8
-rwxr-xr-xtests/FunctionalTests/validators/protected/pages/Layout.tpl1
-rwxr-xr-xtests/FunctionalTests/validators/protected/pages/ListControl.page28
-rwxr-xr-xtests/FunctionalTests/validators/tests/ButtonTestCase.php72
-rwxr-xr-xtests/FunctionalTests/validators/tests/CheckBoxTestCase.php76
-rwxr-xr-xtests/FunctionalTests/validators/tests/CompareValidatorTestCase.php28
-rwxr-xr-xtests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php60
-rwxr-xr-xtests/FunctionalTests/validators/tests/CustomValidatorTestCase.php12
-rwxr-xr-xtests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php30
-rwxr-xr-xtests/FunctionalTests/validators/tests/DatePickerTestCase.php84
-rwxr-xr-xtests/FunctionalTests/validators/tests/ImageButtonTestCase.php72
-rwxr-xr-xtests/FunctionalTests/validators/tests/LinkButtonTestCase.php72
-rwxr-xr-xtests/FunctionalTests/validators/tests/ListControlTestCase.php33
-rwxr-xr-xtests/FunctionalTests/validators/tests/RangeValidatorTestCase.php198
-rwxr-xr-xtests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php34
-rwxr-xr-xtests/FunctionalTests/validators/tests/RequiredFieldTestCase.php52
-rwxr-xr-xtests/FunctionalTests/validators/tests/RequiredListTestCase.php32
-rwxr-xr-xtests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php46
259 files changed, 3386 insertions, 3008 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page
index 7cb8c6b3..f3df76a2 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h3 class="ContentAlternating">Some AJAX Tests</h3>
<com:TPanel CssClass="Content">
@@ -37,6 +37,4 @@
AIP
</com:TActivePanel>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page
index 2e192c19..9e293934 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveButton Functional Test</h1>
<com:TActiveButton ID="button2" Text="Button 1"
@@ -6,6 +6,4 @@
<com:TActiveLabel ID="label1" Text="Label 1" />
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page
index 431d42f2..297cde15 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active CheckBox Test</h1>
<com:TActiveCheckBox ID="checkbox1" Text="CheckBox 1" OnCallback="checkbox_requested" />
<com:TActiveCheckBox ID="checkbox2" Text="CheckBox 2" OnCallback="checkbox_requested">
@@ -25,5 +25,4 @@
position: absolute; right: 0; top: 0">
Loading...
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page
index 7b983cd7..5a1c5023 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Active Control With Expression Tag Test</h1>
@@ -22,6 +22,5 @@
<com:TActiveButton ID="button2" Text="Show More!" Enabled="false"
OnCallback="button2_callback" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page
index aa3be754..9a561458 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Active Control with TinyMCE</h1>
<com:THtmlArea ID="text1" />
@@ -7,5 +7,4 @@
<com:TActiveLabel ID="label1" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
index 88117744..ce40e1cb 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
@@ -1,15 +1,12 @@
-<html>
-<com:THead/>
-<body>
-<com:TForm>
+<com:TContent ID="Content">
<h1>TActiveDatePicker test</h1>
<p>
-<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/>
<com:TActiveLabel ID="status" /><br/>
<com:TActiveButton ID="decreaseButton" OnClick="decrease" Text="-1" OnCallback="testDatePicker"/>
<com:TActiveButton ID="todayButton" OnClick="today" Text="Today" OnCallback="testDatePicker"/>
<com:TActiveButton ID="increaseButton" OnClick="increase" Text="+1" OnCallback="testDatePicker"/>
<com:TButton ID="toggleButton" OnClick="toggleMode" Text="Toggle input mode (postback)"/>
+<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/>
</p>
<p>
ShowCalendar=false
@@ -23,6 +20,4 @@ ShowCalendar=false
<com:TActiveDatePicker ID="datepicker3" DateFormat="MMMM/yyyy" OnCallback="testDatePicker3" InputMode="DropDownList" ShowCalendar="true"/>
<com:TActiveLabel ID="status3" /><br/>
-</com:TForm>
-</body>
-</html> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
index dc71a228..bf15ba0e 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active Drop Down List Test Case</h1>
<com:TActiveDropDownList ID="list1" AutoPostBack="true" SelectedIndex="0" OnSelectedIndexChanged="list1_changed">
@@ -26,6 +26,4 @@
<com:TButton ID="button5" Text="Post Back" OnClick="do_postback"/>
</div>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page
index f0fc4b92..317da643 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page
@@ -1,9 +1,9 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active HiddenField Test Case</h1>
-
+
<com:TActiveHiddenField ID="HiddenFieldEmpty" />
<com:TActiveHiddenField ID="HiddenFieldUsed" Value="My value" />
-
+
<div>
<com:TActiveButton ID="Button1" Text="Set value to HiddenFieldEmpty" OnClick="onSetValue" />
<com:TActiveButton ID="Button2" Text="Get value from HiddenFieldUsed" OnClick="onGetValue" />
@@ -12,5 +12,4 @@
<div>
<com:TActiveLabel ID="ResponseLabel" Text="Value of current hidden field" />
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page
index 59098052..9b149b45 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page
@@ -1,6 +1,6 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active HyperLink Test Case</h1>
-
+
<div style="margin:1em; padding:1em; border:1px solid #ccc; text-align:center;">
<com:TActiveHyperLink ID="link1" Text="Link 1" NavigateUrl="http://www.pradosoft.com" />
</div>
@@ -8,6 +8,4 @@
<com:TActiveButton ID="button2" Text="Change Image" OnClick="change_image" />
<com:TActiveButton ID="button3" Text="Change Target" OnClick="change_target" />
<com:TActiveButton ID="button4" Text="Change URL" OnClick="change_url" />
-
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page
index 7696261a..15cf2380 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveImageButton Functional Test</h1>
@@ -19,6 +19,4 @@
<com:TActiveButton ID="button3" Text="Change Align" OnClick="change_align" />
<com:TActiveButton ID="button4" Text="Change Description" OnClick="change_description" />
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page
index cb9f0322..16ea578d 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveLinkButton Functional Test</h1>
<com:TActiveLinkButton ID="button2" Text="Button 1"
@@ -6,6 +6,4 @@
<com:TActiveLabel ID="label1" Text="Label 1" />
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page
index f7c6baaf..115b833a 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page
@@ -23,6 +23,4 @@
<com:TActiveButton ID="button6" Text="Change to Multi-Select" OnClick="change_to_multiple" />
<com:TActiveButton ID="button7" Text="Change to Single-Select" OnClick="change_to_single" />
</div>
-
- <com:TJavascriptLogger />
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page
index 318d53c3..2bf480b4 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active List Box Functional Test</h1>
@@ -22,6 +22,4 @@
<com:TActiveButton ID="button6" Text="Change to Multi-Select" OnClick="change_to_multiple" />
<com:TActiveButton ID="button7" Text="Change to Single-Select" OnClick="change_to_single" />
</div>
-
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
index 7ab4bab9..5eadcb77 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active Panel replacement tests </h1>
<com:TCallback ID="callback1" OnCallback="callback1_requested" />
<com:TActivePanel ID="panel1">
@@ -9,14 +9,13 @@
<div id="div1" style="border:1px solid #666; background-color: #ffe; text-align: center; padding:3em">
Click Me!
</div>
- <script type="text/javascript">
+ <com:TClientScript>
Event.OnLoad(function()
{
Event.observe($("div1"), "click", function()
{
Prado.Callback("<%= $this->callback1->UniqueID %>")
})
- })
- </script>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+ });
+ </com:TClientScript>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page
index 0795e46b..93684bef 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>ActivePanel Visible Test</h1>
@@ -12,6 +12,5 @@
<com:TActivePanel ID="pnlB">bar</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page
index 26feb594..e222a70f 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRadioButtonList Test Case</h1>
<com:TActiveRadioButtonList ID="list1" OnCallback="list1_callback">
@@ -17,6 +17,4 @@
<com:TActiveButton ID="button4" Text="Select Index 4" OnClick="select_index_4" />
</div>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page
index 2bb4c9de..66587943 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Active Radio Button Test</h1>
<com:TActiveRadioButton ID="radio1"
GroupName="group1" Text="Radio Button 1"
@@ -34,5 +34,4 @@
position: absolute; right: 0; top: 0">
Loading...
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page
index 35fcadc7..d3c551b4 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList AllowInput Test Case</h1>
<com:TActiveRatingList ID="RatingList" AllowInput="false"
OnSelectedIndexChanged="ratingChanged">
@@ -11,4 +10,4 @@
<com:TListItem Text="Super" />
</com:TActiveRatingList>
<com:TActiveLabel ID="Status" Text="AllowInput=false" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page
index 84ce4ef3..e0d3cbbe 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList AutoPostBack Test Case</h1>
<com:TActiveRatingList ID="RatingList" AutoPostback="false"
OnSelectedIndexChanged="ratingChanged">
@@ -13,4 +12,4 @@
<com:TActiveLabel ID="Status" Text="AutoPostback=false" />
<br />
<com:TActiveButton ID="Submit" Text="Submit" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page
index 36f4404d..cba50947 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Check Boxes Test Case</h1>
<com:TActiveRatingList ID="RatingList">
<com:TListItem Text="Poor" />
@@ -9,4 +8,4 @@
<com:TListItem Text="Excellent" />
<com:TListItem Text="Super" />
</com:TActiveRatingList>
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page
index 5f732e0d..791176df 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Enabled Test Case</h1>
<com:TActiveRatingList ID="RatingList" Enabled="false"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@
<br />
<com:TActiveButton ID="Enable" Text="Enable" OnClick="enable" />
<com:TActiveButton ID="Disable" Text="Disable" OnClick="disable" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page
index 01e47a34..0a2a5f50 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Hover Caption Test Case</h1>
<com:TActiveRatingList ID="RatingList" CaptionID="Status"
OnSelectedIndexChanged="ratingChanged" Rating="3.5">
@@ -11,4 +10,4 @@
<com:TListItem Text="Super" />
</com:TActiveRatingList>
<com:TActiveLabel ID="Status" Text="CaptionID='Status'" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page
index 942a5b45..c9aed5b4 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList Rating Test Case</h1>
<com:TActiveRatingList ID="RatingList" Rating="5"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@
<br />
<com:TActiveButton ID="SetRating" Text="Set Rating=3"
OnClick="setRating" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page
index dad3fd6e..70220e58 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList ReadOnly Test Case</h1>
<com:TActiveRatingList ID="RatingList" ReadOnly="true"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@
<br />
<com:TActiveButton ID="Writable" Text="Writable" OnClick="writable" />
<com:TActiveButton ID="ReadOnly" Text="ReadOnly" OnClick="readOnly" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page
index 6fb52822..ee26568d 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveRatingList SelectedIndex Test Case</h1>
<com:TActiveRatingList ID="RatingList" SelectedIndex="1"
OnSelectedIndexChanged="ratingChanged">
@@ -14,4 +13,4 @@
<br />
<com:TActiveButton ID="SetSelectedIndex" Text="Set SelectedIndex=5"
OnClick="setSelectedIndex" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page
index 5f7959c5..8f4e175d 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page
@@ -1,8 +1,7 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Redirection Test</h1>
<com:TActiveButton Text="Redirect to Default Page" OnClick="button_clicked" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page
index b05ce62e..50b244b5 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page
@@ -1,6 +1,5 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>ActiveTextBox Callback Test</h1>
<com:TActiveTextBox ID="textbox1" AutoPostBack="true" OnCallback="textbox1_callback" />
<com:TActiveLabel ID="label1" Text="Label 1" />
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page
index 477764c3..98745b55 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<style>
.autocomplete
@@ -58,7 +58,7 @@
<li>
&lt;&lt;
<span class="select"><%# $this->Data %></span>
- &gt;&gt;
+ &gt;&gt;
</li>
</prop:Suggestions.ItemTemplate>
</com:TAutoComplete>
@@ -79,7 +79,7 @@
OnSuggest="suggestCountries"
OnCallback="callback_requested"
OnSuggestionSelected="suggestion_selected"
- ResultPanel.CssClass="autocomplete"
+ ResultPanel.CssClass="autocomplete"
MinChars="4" Frequency="2" />
<p><br /></p>
@@ -91,5 +91,4 @@
<p><br /></p>
<p><br /></p>
<p><br /></p>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Calculator.page b/tests/FunctionalTests/active-controls/protected/pages/Calculator.page
index 7a565658..e7b1f180 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/Calculator.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/Calculator.page
@@ -1,17 +1,17 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Callback Enabled Calculator</h1>
-
+
<com:TActiveTextBox id="a" />
+
<com:TActiveTextBox id="b" />
=
<com:TActiveTextBox id="c" />
-
- <com:TActiveButton id="sum"
- onclick="do_sum"
+
+ <com:TActiveButton id="sum"
+ onclick="do_sum"
text="Calculate!" />
-
- <com:TRequiredFieldValidator
+
+ <com:TRequiredFieldValidator
ControlToValidate="a"
ErrorMessage="left summand is required."
ControlCssClass="required"
@@ -27,5 +27,5 @@
ID="summary"
HeaderText="Unable to calculate because" />
</div>
-
-</com:TForm> \ No newline at end of file
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Callback.page b/tests/FunctionalTests/active-controls/protected/pages/Callback.page
index d8744760..f8489af3 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/Callback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/Callback.page
@@ -1,15 +1,13 @@
-<com:TForm>
+<com:TContent ID="Content">
<com:TCallback ID="callback1" OnCallback="callback1_Requested" />
- <script type="text/javascript">
+ <script type="text/javascript">
function do_callback1()
- {
+ {
var callback = <%= $this->callback1->ActiveControl->Javascript %>;
callback.dispatch();
- }
- </script>
+ }
+ </script>
<div onclick="do_callback1()">Click Me!</div>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
index a99fbf55..134e45cb 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<style>
.loader
{
@@ -37,6 +37,4 @@
<span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page
index 3cecbade..a82a0d0a 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TCallbackOptions Test</h1>
<com:TCallbackOptions ID="options1">
@@ -31,4 +31,4 @@
<div id="status" style="display:none; background-color: #c00; color:white; text-align:center; padding: 1em" >
Loading...
</div>
-</com:TForm> \ No newline at end of file
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page
index acf56bfe..3b5ed15f 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ClientSideDispatch.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<com:TCallback ID="callback1" OnCallback="method1" />
@@ -7,21 +7,20 @@
var link1 = Prado.CallbackRequest.getRequestById('<%= $this->link1->ClientID %>');
Prado.Callback('<%= $this->callback1->UniqueID %>', link1.getCallbackParameter());
</prop:ClientSide.OnSuccess>
-
+
</com:TCallbackOptions>
- <com:TActiveLinkButton
+ <com:TActiveLinkButton
ID="link1"
- Text="Tab 1"
- OnCallback="method2"
- ActiveControl.CallbackParameter="test"
+ Text="Tab 1"
+ OnCallback="method2"
+ ActiveControl.CallbackParameter="test"
ActiveControl.CallbackOptions="options1"/>
<com:TActiveLabel ID="status1" />
<com:TActiveLabel ID="status2" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page b/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page
index f0f3044d..2dc07852 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ControlAdapterTest.page
@@ -1,10 +1,10 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Control Adapter - State Tracking Tests</h1>
<com:TActiveButton ID="button1" Text="Test Button 1" />
- <com:TActiveButton ID="button2" Text="Test Button 2"
+ <com:TActiveButton ID="button2" Text="Test Button 2"
Attributes.onclick="alert('ok')"
Style.Font.Size="12" Style.BackColor="blue" Style.Height="2em" />
-
+
<div style="margin:1em; padding: 0.5em; border:1px solid #ccc; text-align:center">
<com:TActiveButton ID="test1" Text="Enable/Disable Button 1" OnClick="change_enabled"/>
<com:TActiveButton ID="test2" Text="Hide/Show Button 1" OnClick="change_visible"/>
@@ -19,5 +19,4 @@
<com:TActiveButton ID="test8" Text="Change Button 1 Attributes" OnClick="change_attributes1"/>
<com:TActiveButton ID="test9" Text="Change Button 2 Attributes" OnClick="change_attributes2"/>
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page
index 3bed7d5b..cd34ff98 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Add Dynamic Custom TTemplateControl Test</h1>
<com:TActivePanel ID="Foo">
@@ -10,7 +10,4 @@
<com:TActivePanel ID="placeholder" />
<com:TActiveLabel ID="label1" Text="Label 1" />
-
-
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page
index 08b7bb3e..b1fd18ff 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Custom Login</h1>
@@ -10,19 +10,19 @@
</div>
<span>Username:</span><br />
<com:TActiveTextBox ID="Username" />
- <com:TRequiredFieldValidator
+ <com:TRequiredFieldValidator
ID="validator1"
- ControlToValidate="Username"
- ValidationGroup="login"
+ ControlToValidate="Username"
+ ValidationGroup="login"
Text="...is required" Display="Dynamic"/>
<br />
<span>Password:</span><br />
<com:TActiveTextBox TextMode="Password" ID="Password" />
- <com:TActiveCustomValidator
- ID="validator2"
- ControlToValidate="Password"
+ <com:TActiveCustomValidator
+ ID="validator2"
+ ControlToValidate="Password"
Text="*"
OnServerValidate="validateUser" ValidationGroup="login" />
@@ -33,6 +33,5 @@
</div>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page
index 8b39dc55..2f51eff2 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page
@@ -1,7 +1,7 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>DatePicker in Callback</h1>
<com:TDatePicker ID="datepicker" />
<com:TActiveLinkButton OnCallback="testDatePicker" Text="testDatePicker" />
<com:TActiveLabel ID="status" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page
index b8fba648..f858e8eb 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page
@@ -1,7 +1,6 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Delayed Callback Test</h1>
<com:TActiveButton ID="button1" Text="Delayed 4000" OnCallback="callback1" />
<com:TActiveButton ID="button2" Text="Delayed 2000" OnCallback="callback2" />
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page
index df1db27a..c27ea397 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Display Style Test</h1>
<div>
@@ -17,6 +17,5 @@ here.
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page
index 913f6a17..26407827 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/DynamicRepeaterDataTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Dynamic Repeater Data Test</h1>
<com:TActiveButton Text="Click Me!" OnClick="button_clicked" OnCallback="button_callback"/>
@@ -11,6 +11,5 @@
</com:TRepeater>
</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page
index 889636f3..1adbaac1 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Event Triggered Callback Test</h1>
@@ -27,5 +27,4 @@
<div style="padding: 2em; border:1px solid #ccc; margin-top:2em">
<com:TActiveLabel ID="label1" Text="Label 1" />
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page b/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page
index eab14a87..a01e6b5e 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/FeatureList.page
@@ -1,3 +1,3 @@
-<com:TForm ID="form1">
- <com:TBulletedList ID="List" DisplayMode="HyperLink"/>
-</com:TForm>
+<com:TContent ID="Content">
+ <com:TBulletedList ID="List" DisplayMode="HyperLink"/>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
index f4bf644c..bf2b48b7 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
@@ -1,7 +1,7 @@
-<com:TForm>
+<com:TContent ID="Content">
<com:TLabel ForControl="DDropTurno" Text="Turno:"/>
-<com:TActiveDropDownList ID="DDropTurno"
+<com:TActiveDropDownList ID="DDropTurno"
onSelectedIndexChanged="trocaTurno" AutoPostBack="true"/>
<com:TLabel Text="Código:" ForControl="Codigo"/>
@@ -11,6 +11,5 @@
<com:TActiveTextBox ID="Descricao" MaxLength="25" Columns="25"/>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
index ba3a35db..e4fd93e9 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
@@ -1,4 +1,4 @@
-
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -35,7 +35,6 @@
}
</style>
-<com:TForm>
<com:TInPlaceTextBox
ID="Firstname"
Text="firstname"
@@ -60,19 +59,18 @@
ValidationGroup="Group"
/>
<br />
- <com:TActiveButton ID="active_button"
- Text="Active Submit"
+ <com:TActiveButton ID="active_button"
+ Text="Active Submit"
ValidationGroup="Group"
CausesValidation="true"
OnCallback="button_valid"
- />
- <com:TButton ID="passive_button"
- Text="Passive Submit"
+ />
+ <com:TButton ID="passive_button"
+ Text="Passive Submit"
ValidationGroup="Group"
CausesValidation="true"
OnClick="button_valid"
- />
+ />
<br />
<com:TActiveLabel ID="status" Text="Status:" />
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page
index 701bd74c..b4798fe1 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page
@@ -1,12 +1,11 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Large Page State Test</h1>
<com:TActiveButton Text="Show Changes" OnClick="button_clicked"/>
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
<com:TPanel ID="Panel1">
</com:TPanel>
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page
index 0b662617..56ad075e 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page
@@ -1,13 +1,12 @@
<%@ StatePersisterClass="System.Web.UI.TSessionPageStatePersister" %>
-<com:TForm>
+<com:TContent ID="Content">
<h1>Large Page State Test (using Session page state)</h1>
<com:TActiveButton Text="Show Changes" OnClick="button_clicked"/>
<com:TActiveLabel ID="status" />
-<com:TJavascriptLogger />
<com:TPanel ID="Panel1">
</com:TPanel>
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Layout.php b/tests/FunctionalTests/active-controls/protected/pages/Layout.php
new file mode 100755
index 00000000..723f200c
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Layout.php
@@ -0,0 +1,5 @@
+<?php
+
+class Layout extends TTemplateControl
+{
+}
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl b/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl
new file mode 100755
index 00000000..ead6c66f
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Layout.tpl
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<com:THead Title="PRADO Functional Tests">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ .defect
+ {
+ color: #c00;
+ font-size: 1.15em;
+ }
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ .required
+ {
+ border: 1px solid red;
+ background-color: pink;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+<com:TForm>
+<com:TContentPlaceHolder ID="Content" />
+<hr style="margin-top: 2em" />
+</com:TForm>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page
index ab4798a8..33868332 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page
@@ -1,7 +1,6 @@
-<com:TForm>
+<com:TContent ID="Content">
<com:Application.pages.DMessagesPanel ID="panel1" PanelCssClass="one1" />
<com:TActiveButton Text="Show" OnClick="show_clicked" />
<com:TActiveButton Text="Hide" OnClick="hide_clicked" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page
index 7371086a..c877c083 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>My Tab Panel Test</h1>
@@ -36,6 +36,5 @@
This is the contents of panel C
</com:TActivePanel>
-<com:TJavascriptLogger />
-</com:TForm>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page
index 9d3a3d61..9534f0c0 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page
@@ -1,12 +1,12 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>Nested Active Controls Test</h1>
<com:TCallback ID="callback1" OnCallback="callback1_requested" />
<com:TActivePanel ID="panel1">
<com:TPlaceHolder ID="content1" Visible="false">
- Something lalala
+ Something lalala
<com:TActiveButton ID="button1" Text="Button 1" OnClick="button1_clicked" />
<com:TActiveLabel ID="label3" Text="Label 3" />
-
+
</com:TPlaceHolder>
<com:TActiveLabel ID="label1" Text="Label 1" />
</com:TActivePanel>
@@ -14,7 +14,7 @@
Click Me!
</div>
<com:TActiveLabel ID="label2" Text="Label 2" />
- <script type="text/javascript">
+ <com:TClientScript>
Event.OnLoad(function()
{
Event.observe($("div1"), "click", function()
@@ -22,7 +22,6 @@
Prado.Callback("<%= $this->callback1->UniqueID %>")
})
})
- </script>
- <com:TJavascriptLogger />
-
-</com:TForm>
+ </com:TClientScript>
+
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
index 2ce98f5b..6b5ed334 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
@@ -1,10 +1,9 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Null State Test</h1>
<com:TActiveLabel ID="lblTest"/>
<com:TActiveButton OnCallback="btnTest_OnCallback" Text="Clickme"/>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page
index c7bf0952..3ab9d8fb 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Populate active list controls</h1>
<com:TActiveListBox ID="list1" OnCallback="list_changed" />
@@ -12,6 +12,5 @@
<com:TActiveButton ID="button2" Text="populate list 2" OnClick="populate_list2" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page
index 09ab2fbc..0a8167c8 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1 id="heading">PostLoading Test</h1>
<com:TCallback ID="callback1" OnCallback="Page.callback1_requested" />
@@ -9,7 +9,7 @@
Click Me!
</div>
- <script type="text/javascript">
+ <com:TClientScript>
Event.OnLoad(function()
{
Event.observe($("div1"), "click", function()
@@ -17,8 +17,5 @@
Prado.Callback("<%= $this->callback1->UniqueID %>")
})
})
- </script>
-
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+ </com:TClientScript>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page
index 7de9c6ab..e1a2cb93 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<com:TRequiredFieldValidator
ControlToValidate="rad_button_list"
@@ -6,8 +6,8 @@
Display="Dynamic"
ValidationGroup="Group"
/>
- <br />
- <com:TActiveRadioButtonList
+ <br />
+ <com:TActiveRadioButtonList
ID="rad_button_list"
OnCallback="radChange">
<com:TListItem Value="yes" Text="Yes" />
@@ -16,15 +16,14 @@
</com:TActiveRadioButtonList>
<br />
<com:TActiveLabel
- ID="label"
+ ID="label"
Text="Choice : " />
<br /><br /><br />
<com:TActiveButton
ID="action_button"
Text="action"
OnCallback="action"
- ValidationGroup="Group" />
+ ValidationGroup="Group" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
index ba9c2e5d..6cb9d34a 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
@@ -1,5 +1,4 @@
-<com:THead/>
-<com:TForm>
+<com:TContent ID="Content">
<style>
.more td
{
@@ -93,6 +92,5 @@
Loading...
</div>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
index b94fdbfb..52fdea2d 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -56,6 +56,5 @@
<com:TActiveLabel ID="label1" />
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page
index 7842cde9..c946d5fd 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ReplaceContentTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Callback Replace Content Test</h1>
@@ -26,6 +26,5 @@ Main Panel
<com:TActiveButton id="btn_replace" Text="Replace" OnCallback="replaceContent"/>
-<com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page
index fdd4a604..48d1207f 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page
@@ -1,5 +1,4 @@
-<com:THead />
-<com:TForm>
+<com:TContent ID="Content">
<com:TActiveButton ID="button1"
CustomData="0"
@@ -41,7 +40,4 @@
Loading...
</div>
-
-<com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page b/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page
index f3332bad..915092d2 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TActiveCheckBoxListTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TActiveCheckBoxList Test Case</h1>
<com:TActiveCheckBoxList ID="list1" OnCallback="list1_callback">
@@ -19,6 +19,4 @@
<com:TActiveButton ID="button5" Text="Select Values 'value 2', 'value 5'" OnClick="select_values_25" />
</div>
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page
index 41390e52..e126f34a 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TActiveFileUploadAutoPostBackTest.page
@@ -1,14 +1,12 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1 id="heading">TActiveFileUpload AutoPostBack Functional Test</h1>
<com:TActiveFileUpload ID='uploader' OnFileUpload="uploadComplete" AutoPostBack="false"/>
-
+
<com:TActiveButton ID="button1" Text="Submit File"/>
-
+
<com:TActiveButton ID="button2" Text="This won't submit the file"/>
-
- <com:TActiveLabel ID="label1" Text="Label 1" />
- <com:TJavascriptLogger />
+ <com:TActiveLabel ID="label1" Text="Label 1" />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
index 8c0a0d71..6b0c5109 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page
@@ -1,6 +1,5 @@
<%@ Application.Globalization.Charset="UTF-8" %>
-<com:TForm ID="form1">
-
+<com:TContent ID="Content">
<style>
.textbox
{
@@ -61,7 +60,7 @@
<com:TActiveLabel ID="status" Text="Status:" />
- <com:TInPlaceTextBox
+ <com:TInPlaceTextBox
id="lblNewPackageTitle"
OnTextChanged="NewPackageSubject"
CssClass="textbox"
@@ -72,6 +71,4 @@
<com:TActiveButton Text="ad" OnCallback="button_clicked" />
- <com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page
index 79fc17e0..b9d2c6f3 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TextBoxValidationCallback.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>TextBox AutoPostBack With Group Validation</h1>
<com:TTextBox ID="Address" Columns="60" Maxlength="128" />
<com:TRequiredFieldValidator
@@ -14,8 +14,7 @@
Maxlength="12"
ValidationGroup="post"
OnCallback="lookupZipCode"/>
-<com:TJavascriptLogger />
<com:TActiveTextBox ID="City" Columns="60" Maxlength="128" />
-</com:TForm>
+</com:TContent>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page
index a285f03d..050f6681 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page
@@ -1,4 +1,4 @@
-<com:TForm ID="form1">
+<com:TContent ID="Content">
<h1>TTimeTriggeredCallback + ViewState Tests</h1>
<com:TActiveButton id="button1" Text="Start Timer" OnCallback="start_timer" />
<com:TActiveButton Text="Stop Timer" OnCallback="stop_timer" />
@@ -17,5 +17,4 @@
position: absolute; right: 0; top: 0">
Loading...
</div>
- <com:TJavascriptLogger />
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page
index 1281cc5c..a164afc9 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page
@@ -1,4 +1,4 @@
-<com:TForm>
+<com:TContent ID="Content">
<h1>Value Trigger Callback Test</h1>
<com:TTextBox ID="text1" />
@@ -9,6 +9,4 @@
<com:TActiveLabel ID="label1" Text="Label 1" />
-<com:TJavascriptLogger />
-
-</com:TForm> \ No newline at end of file
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/config.xml b/tests/FunctionalTests/active-controls/protected/pages/config.xml
new file mode 100755
index 00000000..05909075
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/config.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <pages MasterClass="Application.pages.Layout" />
+</configuration> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
index c8fcfa57..acbdbb2a 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveButtonTestCase.php
@@ -1,14 +1,15 @@
<?php
-class ActiveButtonTestCase extends PradoGenericSeleniumTest
+class ActiveButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveButtonTest");
- $this->verifyTextPresent("TActiveButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("button2");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveButtonTest");
+ $this->assertContains("TActiveButton Functional Test", $this->source());
+ $this->assertText("{$base}label1", "Label 1");
+ $this->clickOnElement("{$base}button2");
$this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
+ $this->assertText("{$base}label1", "Button 1 was clicked using callback!");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
index 312b8443..c032c084 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxListTestCase.php
@@ -1,55 +1,57 @@
<?php
-class ActiveCheckBoxListTestCase extends PradoGenericSeleniumTest
+class ActiveCheckBoxListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TActiveCheckBoxListTest");
- $this->verifyTextPresent("TActiveCheckBoxList Test Case");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=TActiveCheckBoxListTest");
+ $this->assertContains("TActiveCheckBoxList Test Case", $this->source());
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertCheckBoxes(array(1,2,3));
- $this->click("button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("button5");
+ $this->byId("{$base}button5")->click();
$this->pause(800);
$this->assertCheckBoxes(array(1,4));
- $this->click("list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
- $this->assertText("label1", "Selection: value 2, value 3, value 5");
+ $this->assertText("{$base}label1", "Selection: value 2, value 3, value 5");
- $this->click("list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
- $this->assertText("label1", "Selection: value 2, value 5");
+ $this->assertText("{$base}label1", "Selection: value 2, value 5");
}
function assertCheckBoxes($checks, $total = 5)
{
+ $base='ctl0_Content_';
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
+ $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected());
else
- $this->assertNotChecked("list1_c{$i}");
+ $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected());
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
index 6f235273..782b35be 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
@@ -1,59 +1,60 @@
<?php
-class ActiveCheckBoxTestCase extends PradoGenericSeleniumTest
+class ActiveCheckBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveCheckBoxTest");
- $this->verifyTextPresent("Active CheckBox Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveCheckBoxTest");
+ $this->assertContains("Active CheckBox Test", $this->source());
- $this->assertText("checkbox1_label", "CheckBox 1");
- $this->assertText("checkbox2_label", "CheckBox 2");
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}checkbox1_label", "CheckBox 1");
+ $this->assertText("{$base}checkbox2_label", "CheckBox 2");
+ $this->assertText("{$base}label1", 'Label 1');
- $this->click("change_text1");
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
- $this->assertText('checkbox1_label', 'Hello CheckBox 1');
+ $this->assertText("{$base}checkbox1_label", 'Hello CheckBox 1');
- $this->click("change_text2");
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
- $this->assertText('checkbox2_label', 'CheckBox 2 World');
+ $this->assertText("{$base}checkbox2_label", 'CheckBox 2 World');
//check box 1
- $this->click('change_checked1');
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertChecked('checkbox1');
+ $this->assertTrue($this->byId("{$base}checkbox1")->selected());
- $this->click('change_checked1');
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertNotChecked('checkbox1');
+ $this->assertFalse($this->byId("{$base}checkbox1")->selected());
//check box 2
- $this->click('change_checked2');
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertChecked('checkbox2');
+ $this->assertTrue($this->byId("{$base}checkbox2")->selected());
- $this->click('change_checked2');
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertNotChecked('checkbox2');
+ $this->assertFalse($this->byId("{$base}checkbox2")->selected());
//click checkbox 1
- $this->click("checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Checked");
- $this->click("checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Not Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Not Checked");
//click checkbox 2
- $this->click("checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Checked");
+ $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Checked");
- $this->click("checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Not Checked");
+ $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Not Checked");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
index 75b86e19..c41988cc 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveControlExpressTagTestCase.php
@@ -1,18 +1,19 @@
<?php
-class ActiveControlExpressionTagTestCase extends PradoGenericSeleniumTest
+class ActiveControlExpressionTagTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=ActiveControlExpressionTag');
- $this->assertTextPresent('Active Control With Expression Tag Test');
- $this->assertTextNotPresent('Text box content:');
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=ActiveControlExpressionTag');
+ $this->assertContains('Active Control With Expression Tag Test', $this->source());
+ $this->assertNotContains('Text box content:', $this->source());
- $this->type('textbox1', 'Hello world');
- $this->click('button1');
+ $this->type("{$base}textbox1", 'Hello world');
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText('repeats', 'result - 1 result - two');
- $this->assertText('contents', 'Text box content: Hello world');
+ $this->assertText("repeats", 'result - 1 result - two');
+ $this->assertText("contents", 'Text box content: Hello world');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
index be0a6fb4..570a6717 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
@@ -1,118 +1,119 @@
<?php
-class ActiveDatePickerTestCase extends PradoGenericSeleniumTest
+class ActiveDatePickerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveDatePicker");
- $this->verifyTextPresent("TActiveDatePicker test");
- $this->verifyText("status", "");
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->click("increaseButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('+ 1 day')));
- $this->click("increaseButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 2 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('+ 2 day')));
- $this->click("todayButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->verifyText("status", date('m-d-Y'));
- $this->click("decreaseButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('- 1 day')));
- $this->verifyText("status", date('m-d-Y', strtotime('- 1 day')));
- $this->click("datepicker");
- $this->pause(800);
- $this->click("css=input.todayButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y'));
- $this->verifyText("status", date('m-d-Y'));
- $this->click("css=input.nextMonthButton");
- $this->pause(800);
- $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 month')));
- $this->verifyText("status", date('m-d-Y', strtotime('+1 month')));
-
- $this->click('toggleButton');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveDatePicker");
+ $this->assertContains("TActiveDatePicker test", $this->source());
+ $this->assertText("{$base}status", "");
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->byId("{$base}increaseButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 day')));
+ $this->assertText("{$base}status", date('m-d-Y', strtotime('+ 1 day')));
+ $this->byId("{$base}increaseButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 2 day')));
+ $this->assertText("{$base}status", date('m-d-Y', strtotime('+ 2 day')));
+ $this->byId("{$base}todayButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->assertText("{$base}status", date('m-d-Y'));
+ $this->byId("{$base}decreaseButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('- 1 day')));
+ $this->assertText("{$base}status", date('m-d-Y', strtotime('- 1 day')));
+ $this->byId("{$base}datepicker")->click();
+ $this->pause(800);
+ $this->byCssSelector("input.todayButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y'));
+ $this->assertText("{$base}status", date('m-d-Y'));
+ $this->byCssSelector("input.nextMonthButton")->click();
+ $this->pause(800);
+ $this->assertValue("{$base}datepicker", date('m-d-Y', strtotime('+ 1 month')));
+ $this->assertText("{$base}status", date('m-d-Y', strtotime('+1 month')));
+
+ $this->byId("{$base}toggleButton")->click();
$this->pause(2000);
-
- $this->click("todayButton");
+
+ $this->byId("{$base}todayButton")->click();
$this->pause(800);
- $this->assertSelected("datepicker_month", date('m'));
- $this->verifyText("status", date('m-d-Y'));
-
- $this->click("increaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m'));
+ $this->assertText("{$base}status", date('m-d-Y'));
+
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 1 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("increaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byId("{$base}increaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 2 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("todayButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byId("{$base}todayButton")->click();
$this->pause(800);
$dateToCheck=time();
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("decreaseButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byId("{$base}decreaseButton")->click();
$this->pause(800);
$dateToCheck=strtotime('- 1 day');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("datepickerbutton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byId("{$base}datepickerbutton")->click();
$this->pause(800);
- $this->click("css=input.todayButton");
+ $this->byCssSelector("input.todayButton")->click();
$this->pause(800);
$dateToCheck=time();
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click("css=input.nextMonthButton");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byCssSelector("input.nextMonthButton")->click();
$this->pause(800);
$dateToCheck=strtotime('+ 1 month');
- $this->assertSelected("datepicker_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker_year", date('Y', $dateToCheck));
- $this->verifyText("status", date('m-d-Y', $dateToCheck));
-
- $this->click('ctl1');
- $this->pause(800);
-
- $this->verifyText("status2", "");
+ $this->assertSelected("{$base}datepicker_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker_year", date('Y', $dateToCheck));
+ $this->assertText("{$base}status", date('m-d-Y', $dateToCheck));
+
+ $this->byId('ctl0_ctl1')->click();
+ $this->pause(800);
+
+ $this->assertText("{$base}status2", "");
$dateToCheck=time();
- $this->assertSelected("datepicker2_month", date('m', $dateToCheck));
- $this->assertSelected("datepicker2_day", date('d', $dateToCheck));
- $this->assertSelected("datepicker2_year", date('Y', $dateToCheck));
- $this->select("datepicker2_year", date('Y')+1);
+ $this->assertSelected("{$base}datepicker2_month", date('m', $dateToCheck));
+ $this->assertSelected("{$base}datepicker2_day", date('d', $dateToCheck));
+ $this->assertSelected("{$base}datepicker2_year", date('Y', $dateToCheck));
+ $this->select("{$base}datepicker2_year", date('Y')+1);
$this->pause(800);
$dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1);
- $this->verifyText("status2", date('m-d-Y', $dateToCheck));
+ $this->assertText("{$base}status2", date('m-d-Y', $dateToCheck));
- $this->verifyText("status3", "");
+ $this->assertText("{$base}status3", "");
$dateToCheck=time();
- $this->assertSelected("datepicker3_month", date('F', $dateToCheck));
- $this->assertSelected("datepicker3_year", date('Y', $dateToCheck));
- $this->select("datepicker3_year", date('Y')+1);
+ $this->assertSelected("{$base}datepicker3_month", date('F', $dateToCheck));
+ $this->assertSelected("{$base}datepicker3_year", date('Y', $dateToCheck));
+ $this->select("{$base}datepicker3_year", date('Y')+1);
$this->pause(800);
$dateToCheck=mktime(0,0,0,(int)date('m'),(int)date('d'), date('Y')+1);
- $this->verifyText("status3", date('m/Y', $dateToCheck));
+ $this->assertText("{$base}status3", date('m/Y', $dateToCheck));
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
index a54cbd75..cb8c953f 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
@@ -1,45 +1,46 @@
<?php
-class ActiveDropDownListTestCase extends PradoGenericSeleniumTest
+class ActiveDropDownListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveDropDownList");
- $this->assertTextPresent('Active Drop Down List Test Case');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveDropDownList");
+ $this->assertContains('Active Drop Down List Test Case', $this->source());
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertSelected("list1", "item 4");
+ $this->assertSelected("{$base}list1", "item 4");
- $this->click("button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertSelectedIndex("list1", 0);
+ $this->assertSelectedValue("{$base}list1", 'value 1');
- $this->click("button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
- $this->assertSelected("list1", "item 2");
+ $this->assertSelected("{$base}list1", "item 2");
- $this->assertText("label1", "Selection 1: value 1");
+ $this->assertText("{$base}label1", "Selection 1: value 1");
- $this->select("list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->select("list2", "value 1 - item 4");
+ $this->select("{$base}list2", "value 1 - item 4");
$this->pause(800);
- $this->assertText("label2", "Selection 2: value 1 - item 4");
+ $this->assertText("{$base}label2", "Selection 2: value 1 - item 4");
- $this->select("list1", "item 3");
+ $this->select("{$base}list1", "item 3");
$this->pause(800);
- $this->select("list2", "value 3 - item 5");
+ $this->select("{$base}list2", "value 3 - item 5");
$this->pause(800);
- $this->assertText("label2", "Selection 2: value 3 - item 5");
+ $this->assertText("{$base}label2", "Selection 2: value 3 - item 5");
- $this->click('button4');
+ $this->byId("{$base}button4")->click();
$this->pause(800);
- $this->assertSelected('list1', 'item 3');
+ $this->assertSelected("{$base}list1", 'item 3');
$this->pause(300);
- $this->assertSelected('list2', 'value 3 - item 3');
+ $this->assertSelected("{$base}list2", 'value 3 - item 3');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
index b8c02868..d4b82068 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
@@ -1,22 +1,23 @@
<?php
-class ActiveHiddenFieldTestCase extends PradoGenericSeleniumTest
+class ActiveHiddenFieldTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveHiddenFieldTest");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveHiddenFieldTest");
$fieldEmpty = 'No longer empty';
$fieldUsed = 'My value';
-
- $this->verifyTextPresent('Value of current hidden field');
- $this->click('Button1');
+
+ $this->assertContains('Value of current hidden field', $this->source());
+ $this->byId("{$base}Button1")->click();
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldEmpty);
- $this->click('Button2');
+ $this->assertText("{$base}ResponseLabel", $fieldEmpty);
+ $this->byId("{$base}Button2")->click();
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldUsed);
- $this->click('Button3');
+ $this->assertText("{$base}ResponseLabel", $fieldUsed);
+ $this->byId("{$base}Button3")->click();
$this->pause(800);
- $this->assertText('ResponseLabel', $fieldEmpty.'|'.$fieldUsed);
+ $this->assertText("{$base}ResponseLabel", $fieldEmpty.'|'.$fieldUsed);
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
index bfcdd206..6329d826 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveHyperLinkTestCase.php
@@ -1,16 +1,17 @@
<?php
-class ActiveHyperLinkTestCase extends PradoGenericSeleniumTest
+class ActiveHyperLinkTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveHyperLinkTest");
- $this->assertTextPresent("Active HyperLink Test Case");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveHyperLinkTest");
+ $this->assertContains("Active HyperLink Test Case", $this->source());
- $this->assertText("link1", "Link 1");
+ $this->assertText("{$base}link1", "Link 1");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("link1", "Pradosoft.com");
+ $this->assertText("{$base}link1", "Pradosoft.com");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
index 2989ab27..0ef2e082 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveImageButtonTestCase.php
@@ -1,15 +1,16 @@
<?php
-class ActiveImageButtonTestCase extends PradoGenericSeleniumTest
+class ActiveImageButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveImageButtonTest");
- $this->assertTextPresent("TActiveImageButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("image1");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveImageButtonTest");
+ $this->assertContains("TActiveImageButton Functional Test", $this->source());
+ $this->assertText("{$base}label1", "Label 1");
+ $this->byId("{$base}image1")->click();
$this->pause(800);
//unable to determine mouse position
- $this->assertTextPresent("regexp:Image clicked at x=\d+, y=\d+");
+ $this->assertRegExp('/Image clicked at x=\d+, y=\d+/', $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
index 88cdf15e..1f7c40ea 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveLinkButtonTestCase.php
@@ -1,14 +1,15 @@
<?php
-class ActiveLinkButtonTestCase extends PradoGenericSeleniumTest
+class ActiveLinkButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveLinkButtonTest");
- $this->verifyTextPresent("TActiveLinkButton Functional Test");
- $this->assertText("label1", "Label 1");
- $this->click("button2");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveLinkButtonTest");
+ $this->assertContains("TActiveLinkButton Functional Test", $this->source());
+ $this->assertText("{$base}label1", "Label 1");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertText("label1", "Button 1 was clicked using callback!");
+ $this->assertText("{$base}label1", "Button 1 was clicked using callback!");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
index 911e3cc7..be2bf174 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxMasterTestCase.php
@@ -1,48 +1,48 @@
<?php
-class ActiveListBoxMasterTestCase extends PradoGenericSeleniumTest
+class ActiveListBoxMasterTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveListBoxMasterTest");
- $this->assertTextPresent('Active List Box Functional Test');
+ $this->url("active-controls/index.php?page=ActiveListBoxMasterTest");
+ $this->assertContains('Active List Box Functional Test', $this->source());
$base = 'ctl0_body_';
- $this->assertText($base."label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click($base."button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click($base.'button3');
+ $this->byId("{$base}button3")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 1'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click($base.'button4');
+ $this->byId("{$base}button4")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click($base.'button5');
+ $this->byId("{$base}button5")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click($base.'button2');
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertNotSomethingSelected($base."list1");
+ $this->assertNotSomethingSelected("{$base}list1");
- $this->click($base.'button6');
+ $this->byId("{$base}button6")->click();
$this->pause(800);
- $this->click($base."button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels($base.'list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->select($base."list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1');
+ $this->assertText("{$base}label1", 'Selection: value 1');
- $this->addSelection($base."list1", "item 4");
+ $this->addSelection("{$base}list1", "item 4");
$this->pause(800);
- $this->assertText($base.'label1', 'Selection: value 1, value 4');
+ $this->assertText("{$base}label1", 'Selection: value 1, value 4');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
index d45cb42c..1830f5ab 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php
@@ -1,46 +1,47 @@
<?php
-class ActiveListBoxTestCase extends PradoGenericSeleniumTest
+class ActiveListBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveListBoxTest");
- $this->assertTextPresent('Active List Box Functional Test');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveListBoxTest");
+ $this->assertContains('Active List Box Functional Test', $this->source());
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->click('button3');
+ $this->byId("{$base}button3")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 1'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
- $this->click('button4');
+ $this->byId("{$base}button4")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
- $this->click('button5');
+ $this->byId("{$base}button5")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 5'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
- $this->click('button2');
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertNotSomethingSelected("list1");
+ $this->assertNotSomethingSelected("{$base}list1");
- $this->click('button6');
+ $this->byId("{$base}button6")->click();
$this->pause(800);
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
- $this->select("list1", "item 1");
+ $this->select("{$base}list1", "item 1");
$this->pause(800);
- $this->assertText('label1', 'Selection: value 1');
+ $this->assertText("{$base}label1", 'Selection: value 1');
- $this->addSelection("list1", "item 4");
+ $this->addSelection("{$base}list1", "item 4");
$this->pause(800);
- $this->assertText('label1', 'Selection: value 1, value 4');
+ $this->assertText("{$base}label1", 'Selection: value 1, value 4');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
index 9b069a14..73ab3ad0 100755
--- a/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActivePanelTestCase.php
@@ -1,14 +1,15 @@
<?php
-class ActivePanelTestCase extends PradoGenericSeleniumTest
+class ActivePanelTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActivePanelTest");
- $this->verifyTextPresent("Active Panel replacement tests");
- $this->assertTextNotPresent('Something lalala');
- $this->click("div1");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActivePanelTest");
+ $this->assertContains("Active Panel replacement tests", $this->source());
+ $this->assertNotContains('Something lalala', $this->source());
+ $this->byId("div1")->click();
$this->pause(800);
- $this->assertTextPresent("Something lalala");
+ $this->assertContains("Something lalala", $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
index b0942ffa..82408732 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
@@ -1,45 +1,47 @@
<?php
-class ActiveRadioButtonListTestCase extends PradoGenericSeleniumTest
+class ActiveRadioButtonListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveRadioButtonListTest");
- $this->verifyTextPresent("TActiveRadioButtonList Test Case");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveRadioButtonListTest");
+ $this->assertContains("TActiveRadioButtonList Test Case", $this->source());
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->click("button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertCheckBoxes(array(0));
- $this->click("button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertCheckBoxes(array());
- $this->click("button4");
+ $this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertCheckBoxes(array(4));
- $this->click("list1_c2");
+ $this->byId("{$base}list1_c2")->click();
$this->pause(800);
- $this->assertText("label1", "Selection: value 3");
+ $this->assertText("{$base}label1", "Selection: value 3");
- $this->click("list1_c3");
+ $this->byId("{$base}list1_c3")->click();
$this->pause(800);
- $this->assertText("label1", "Selection: value 4");
+ $this->assertText("{$base}label1", "Selection: value 4");
}
function assertCheckBoxes($checks, $total = 5)
{
+ $base='ctl0_Content_';
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("list1_c{$i}");
+ $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected());
else
- $this->assertNotChecked("list1_c{$i}");
+ $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected());
}
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
index fceb2e21..7606e46b 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
@@ -1,52 +1,53 @@
<?php
-class ActiveRadioButtonTestCase extends PradoGenericSeleniumTest
+class ActiveRadioButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->verifyTextPresent("Active Radio Button Test");
- $this->assertText('label1', 'Label 1');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveRadioButtonTest");
+ $this->assertContains("Active Radio Button Test", $this->source());
+ $this->assertText("{$base}label1", 'Label 1');
- $this->assertNotChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->assertText('radio1_label', 'Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_text1');
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_text2');
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2 World');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2 World');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_radio1');
+ $this->byId("{$base}change_radio1")->click();
$this->pause(800);
- $this->assertChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertTrue($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click('change_radio2');
+ $this->byId("{$base}change_radio2")->click();
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click('radio3');
+ $this->byId("{$base}radio3")->click();
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertChecked('radio3');
- $this->assertText('label1', 'Label 1:Radio Button 3 Checked');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertTrue($this->byId("{$base}radio3")->selected());
+ $this->assertText("{$base}label1", 'Label 1:Radio Button 3 Checked');
}
diff --git a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
index 2033d6ff..3fbf1e5e 100755
--- a/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
@@ -1,42 +1,43 @@
<?php
-class AutoCompleteTestCase extends PradoGenericSeleniumTest
+class AutoCompleteTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=AutoCompleteTest");
- $this->verifyTextPresent("TAutoComplete Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=AutoCompleteTest");
+ $this->assertContains("TAutoComplete Test", $this->source());
- $this->assertText("label1", "Label 1");
+ $this->assertText("{$base}label1", "Label 1");
- $this->type("textbox3", 'a');
- $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})');
- $this->pause(500);
- $this->verifyTextPresent('Andorra');
- $this->assertText("label1", "suggestion for a");
+ $this->byId("{$base}textbox3")->click();
+ $this->keys('a');
+ $this->pause(800);
+ $this->assertContains('Andorra', $this->source());
+ $this->assertText("{$base}label1", "suggestion for a");
- $this->type("textbox3", 'au');
- $this->runScript('Prado.Registry.get(\'textbox3\').onKeyPress({})');
- $this->pause(500);
- $this->verifyTextPresent('Australia');
- $this->assertText("label1", "suggestion for au");
+ $this->keys('u');
+ $this->pause(800);
+ $this->assertContains('Australia', $this->source());
+ $this->assertText("{$base}label1", "suggestion for au");
- $this->click("css=#textbox3_result ul li");
- $this->pause(500);
- $this->assertText("label1", "Label 1: Austria");
+ $this->byCssSelector("#{$base}textbox3_result ul li")->click();
+ $this->pause(800);
+ $this->assertText("{$base}label1", "Label 1: Austria");
- $this->type("textbox2", "cu");
- $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})');
- $this->pause(500);
- $this->click('css=#textbox2_result ul li');
- $this->pause(500);
- $this->assertText("label1", "Label 1: Cuba");
- $this->type("textbox2", "Cuba,me");
- $this->runScript('Prado.Registry.get(\'textbox2\').onKeyPress({})');
- $this->pause(500);
- $this->click('css=#textbox2_result ul li');
+ $this->byId("{$base}textbox2")->click();
+ $this->keys('cu');
+ $this->pause(800);
+ $this->byCssSelector("#{$base}textbox2_result ul li")->click();
+ $this->pause(800);
+ $this->assertText("{$base}label1", "Label 1: Cuba");
+
+ $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END);
+ $this->keys(',me');
+ $this->pause(800);
+ $this->byCssSelector("#{$base}textbox2_result ul li")->click();
$this->pause(500);
- $this->assertText("label1", "Label 1: Cuba,Mexico");
+ $this->assertText("{$base}label1", "Label 1: Cuba,Mexico");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
index 48960d39..9bef7d00 100755
--- a/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CalculatorTestCase.php
@@ -1,23 +1,24 @@
<?php
-class CalculatorTestCase extends PradoGenericSeleniumTest
+class CalculatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=Calculator");
- $this->assertTextPresent("Callback Enabled Calculator");
- $this->assertNotVisible("summary");
-
- $this->click("sum");
- $this->assertVisible("summary");
-
- $this->type("a", "2");
- $this->type("b", "5");
-
- $this->click("sum");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=Calculator");
+ $this->assertContains("Callback Enabled Calculator", $this->source());
+ $this->assertNotVisible("{$base}summary");
+
+ $this->byId("{$base}sum")->click();
+ $this->assertVisible("{$base}summary");
+
+ $this->type("{$base}a", "2");
+ $this->type("{$base}b", "5");
+
+ $this->byId("{$base}sum")->click();
$this->pause(500);
- $this->assertNotVisible("summary");
- $this->assertValue("c", "7");
+ $this->assertNotVisible("{$base}summary");
+ $this->assertValue("{$base}c", "7");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
index c495935a..d5d112d8 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php
@@ -1,58 +1,66 @@
<?php
-class CallbackAdapterTestCase extends PradoGenericSeleniumTest
+class CallbackAdapterTestCase extends PradoGenericSelenium2Test
{
function test()
{
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ControlAdapterTest");
+ $this->assertContains('Control Adapter - State Tracking Tests', $this->source());
- $this->open("active-controls/index.php?page=ControlAdapterTest");
- $this->assertTextPresent('Control Adapter - State Tracking Tests');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
- $this->click('button2');
- $this->assertAlert('ok');
-
- $this->click('test6');
+ $this->byId("{$base}test6")->click();
$this->pause(800);
- $this->click('test7');
+ $this->byId("{$base}test7")->click();
$this->pause(800);
- $this->click('test8');
+ $this->byId("{$base}test8")->click();
$this->pause(800);
- $this->click('test9');
+ $this->byId("{$base}test9")->click();
$this->pause(800);
- $this->click('button1');
- $this->assertAlert('haha!');
-
- $this->click('button2');
- $this->assertAlert('ok');
- $this->assertAlert('baz!');
+ $this->byId("{$base}button1")->click();
+ $this->assertEquals('haha!', $this->alertText());
+ $this->acceptAlert();
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
+ $this->pause(500);
+ $this->assertEquals('baz!', $this->alertText());
+ $this->acceptAlert();
}
/*
function testIE()
{
- $this->open("active-controls/index.php?page=ControlAdapterTest");
- $this->assertTextPresent('Control Adapter - State Tracking Tests');
+ $this->url("active-controls/index.php?page=ControlAdapterTest");
+ $this->assertContains('Control Adapter - State Tracking Tests', $this->source());
- $this->click('button2');
- $this->assertAlert('ok');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
- $this->click('test6');
+ $this->byId('test6')->click();
$this->pause(800);
- $this->click('test7');
+ $this->byId('test7')->click();
$this->pause(800);
- $this->click('test8');
+ $this->byId('test8')->click();
$this->pause(800);
- $this->click('test9');
+ $this->byId('test9')->click();
$this->pause(800);
- $this->click('button1');
- $this->assertAlert('haha!');
+ $this->byId("{$base}button1")->click();
+ $this->assertEquals('haha!', $this->alertText());
+ $this->acceptAlert();
//IE alerts in diffrent order
- $this->click('button2');
- $this->assertAlert('baz!');
- $this->assertAlert('ok');
+ $this->byId("{$base}button2")->click();
+ $this->assertEquals('baz!', $this->alertText());
+ $this->acceptAlert();
+ $this->assertEquals('ok', $this->alertText());
+ $this->acceptAlert();
}
*/
}
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
index d1f48cf3..4c2c7070 100755
--- a/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CallbackOptionsTestCase.php
@@ -1,29 +1,30 @@
<?php
-class CallbackOptionsTestCase extends PradoGenericSeleniumTest
+class CallbackOptionsTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=CallbackOptionsTest");
- $this->verifyTextPresent("TCallbackOptions Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=CallbackOptionsTest");
+ $this->assertContains("TCallbackOptions Test", $this->source());
$this->assertText("label1", "Label 1");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Label 2");
$this->assertText("label3", "Label 3");
- $this->click("button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Button 2 has returned");
$this->assertText("label3", "Label 3");
- $this->click("button3");
+ $this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertText("label1", "Button 1 has returned");
$this->assertText("label2", "Button 2 has returned");
diff --git a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
index 7e38423e..3b594b39 100755
--- a/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
@@ -1,20 +1,21 @@
<?php
-class CustomTemplateTestCase extends PradoGenericSeleniumTest
+class CustomTemplateTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=CustomTemplateControlTest');
- $this->assertTextPresent('Add Dynamic Custom TTemplateControl Test');
- $this->assertText('label1', 'Label 1');
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=CustomTemplateControlTest');
+ $this->assertContains('Add Dynamic Custom TTemplateControl Test', $this->source());
+ $this->assertText("{$base}label1", 'Label 1');
- $this->type('foo', 'Foo Bar!');
- $this->click('button2');
+ $this->type("{$base}foo", 'Foo Bar!');
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertVisible('ctl1_ThePanel');
- $this->assertTextPresent('Client ID: ctl1_ThePanel');
+ $this->assertVisible("{$base}ctl0_ThePanel");
+ $this->assertContains("Client ID: {$base}ctl0_ThePanel", $this->source());
- $this->assertText('label1', 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
+ $this->assertText("{$base}label1", 'Button 1 was clicked Foo Bar! using callback!... and this is the textbox text: Foo Bar!');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
index 841de5aa..49c268ad 100755
--- a/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/DelayedCallbackTestCase.php
@@ -1,20 +1,21 @@
<?php
-class DelayedCallbackTestCase extends PradoGenericSeleniumTest
+class DelayedCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=DelayedCallback");
- $this->verifyTextPresent("Delayed Callback Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=DelayedCallback");
+ $this->assertContains("Delayed Callback Test", $this->source());
- $this->assertText("status", "");
- $this->click("button1");
- $this->click("button2");
+ $this->assertText("{$base}status", "");
+ $this->byId("{$base}button1")->click();
+ $this->byId("{$base}button2")->click();
$this->pause("5000");
- $this->assertText("status", "Callback 1 returned after 4s");
+ $this->assertText("{$base}status", "Callback 1 returned after 4s");
$this->pause("3000");
- $this->assertText("status", "Callback 2 delayed 2s");
+ $this->assertText("{$base}status", "Callback 2 delayed 2s");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
index 30678786..7cc9a3bd 100755
--- a/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/EventTriggerTestCase.php
@@ -1,20 +1,21 @@
<?php
-class EventTriggerTestCase extends PradoGenericSeleniumTest
+class EventTriggerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=EventTriggeredCallback");
- $this->verifyTextPresent("Event Triggered Callback Test");
+ $base = "ctl0_Content_";
+ $this->url("active-controls/index.php?page=EventTriggeredCallback");
+ $this->assertContains("Event Triggered Callback Test", $this->source());
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}label1", 'Label 1');
- $this->click('button1');
+ $this->byId("button1")->click();
$this->pause(800);
- $this->assertText('label1', 'button 1 clicked');
+ $this->assertText("{$base}label1", 'button 1 clicked');
- $this->type('text1', 'test');
+ $this->byId("{$base}text1")->value('test');
$this->pause(800);
- $this->assertText('label1', 'text 1 focused');
+ $this->assertText("{$base}label1", 'text 1 focused');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
index e2ceb33e..f08a6f78 100755
--- a/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/NestedActiveControlsTestCase.php
@@ -1,24 +1,25 @@
<?php
-class NestedActiveControlsTestCase extends PradoGenericSeleniumTest
+class NestedActiveControlsTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=NestedActiveControls");
- $this->verifyTextPresent("Nested Active Controls Test");
- $this->assertText("label1", "Label 1");
- $this->assertText("label2", "Label 2");
- $this->assertTextNotPresent("Label 3");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=NestedActiveControls");
+ $this->assertContains("Nested Active Controls Test", $this->source());
+ $this->assertText("{$base}label1", "Label 1");
+ $this->assertText("{$base}label2", "Label 2");
+ $this->assertNotContains("Label 3", $this->source());
- $this->click("div1");
+ $this->byId("div1")->click();
$this->pause(800);
- $this->assertTextPresent("Something lalala");
- $this->assertText("label3", "Label 3");
+ $this->assertContains("Something lalala", $this->source());
+ $this->assertText("{$base}label3", "Label 3");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1: Button 1 Clicked");
- $this->assertText("label2", "Label 2: Button 1 Clicked");
- $this->assertText("label3", "Label 3: Button 1 Clicked");
+ $this->assertText("{$base}label1", "Label 1: Button 1 Clicked");
+ $this->assertText("{$base}label2", "Label 2: Button 1 Clicked");
+ $this->assertText("{$base}label3", "Label 3: Button 1 Clicked");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
index adb5a3a5..e7f7f287 100755
--- a/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PopulateListTestCase.php
@@ -1,23 +1,24 @@
<?php
-class PopulateListTestCase extends PradoGenericSeleniumTest
+class PopulateListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=PopulateActiveList");
- $this->verifyTextPresent("Populate active list controls");
- $this->assertText("label1", "");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=PopulateActiveList");
+ $this->assertContains("Populate active list controls", $this->source());
+ $this->assertText("{$base}label1", "");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->select("list1", "World");
+ $this->select("{$base}list1", "World");
$this->pause(800);
- $this->assertText("label1", "list1: World");
+ $this->assertText("{$base}label1", "list1: World");
- $this->click("button2");
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->select("list2", "Prado");
+ $this->select("{$base}list2", "Prado");
$this->pause(800);
- $this->assertText("label1", "list2: Prado");
+ $this->assertText("{$base}label1", "list2: Prado");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
index 21a5128d..271a2ffb 100755
--- a/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/PostLoadingTestCase.php
@@ -1,20 +1,21 @@
<?php
-class PostLoadingTestCase extends PradoGenericSeleniumTest
+class PostLoadingTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=PostLoadingTest');
- $this->assertTextPresent('PostLoading Test');
+ $base="ctl0_Content_";
+ $this->url('active-controls/index.php?page=PostLoadingTest');
+ $this->assertContains('PostLoading Test', $this->source());
- $this->assertTextNotPresent('Hello World');
+ $this->assertNotContains('Hello World', $this->source());
- $this->click('div1');
+ $this->byId('div1')->click();
$this->pause(800);
- $this->type('MyTextBox', 'Hello World');
- $this->click('MyButton');
+ $this->type("{$base}MyTextBox", 'Hello World');
+ $this->byId("{$base}MyButton")->click();
$this->pause(800);
- $this->assertTextPresent('Result is Hello World');
+ $this->assertContains('Result is Hello World', $this->source());
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
index fd273ae7..c3345d6a 100755
--- a/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ReplaceContentTestCase.php
@@ -1,90 +1,90 @@
<?php
-class ReplaceContentTestCase extends PradoGenericSeleniumTest
+class ReplaceContentTestCase extends PradoGenericSelenium2Test
{
function test()
{
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=ReplaceContentTest');
+ $this->assertContains('Callback Replace Content Test', $this->source());
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
+ $this->assertText("{$base}subpanel", 'Sub Panel');
+ $this->assertText("{$base}panel1", "Main Panel\nSub Panel");
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'Main Panel Sub Panel');
+ $this->type("{$base}content", 'something');
- $this->type('content', 'something');
-
- $this->click('btn_append');
+ $this->byId("{$base}btn_append")->click();
$this->pause(800);
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'Main Panel Sub Panel something');
+ $this->assertText("{$base}subpanel", 'Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel\nSub Panel something");
- $this->type('content', 'more');
- $this->click('btn_prepend');
+ $this->type("{$base}content", 'more');
+ $this->byId("{$base}btn_prepend")->click();
$this->pause(800);
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel more Sub Panel something');
+ $this->assertText("{$base}subpanel", 'more Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel\nmore Sub Panel something");
- $this->type('content', 'prado');
- $this->click('btn_before');
+ $this->type("{$base}content", 'prado');
+ $this->byId("{$base}btn_before")->click();
$this->pause(800);
- $this->assertText('subpanel', 'more Sub Panel something');
- $this->assertText('panel1', 'Main Panel pradomore Sub Panel something');
+ $this->assertText("{$base}subpanel", 'more Sub Panel something');
+ $this->assertText("{$base}panel1", "Main Panel prado\nmore Sub Panel something");
- $this->type('content', ' php ');
- $this->click('btn_after');
+ $this->type("{$base}content", ' php ');
+ $this->byId("{$base}btn_after")->click();
$this->pause(800);
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
+ $this->type("{$base}content", 'mauahahaha');
+ $this->byId("{$base}btn_replace")->click();
$this->pause(1000);
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
+ $this->assertText("{$base}panel1", 'Main Panel pradomauahahaha php');
}
/*
function testIE()
{
- $this->open('active-controls/index.php?page=ReplaceContentTest');
- $this->assertTextPresent('Callback Replace Content Test');
+ $this->url('active-controls/index.php?page=ReplaceContentTest');
+ $this->assertContains('Callback Replace Content Test', $this->source());
- $this->assertText('subpanel', 'Sub Panel');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel');
+ $this->assertText("{$base}subpanel", 'Sub Panel');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel');
- $this->type('content', 'something');
+ $this->type("{$base}content", 'something');
- $this->click('btn_append');
+ $this->byId('btn_append')->click();
$this->pause(800);
- $this->assertText('subpanel', 'Sub Panel something');
- $this->assertText('panel1', 'regexp:Main Panel\s*Sub Panel\s*something');
+ $this->assertText("{$base}subpanel", 'Sub Panel something');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*Sub Panel\s*something');
- $this->type('content', 'more');
- $this->click('btn_prepend');
+ $this->type("{$base}content", 'more');
+ $this->byId('btn_prepend')->click();
$this->pause(800);
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*moreSub Panel\s*something');
+ $this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*moreSub Panel\s*something');
- $this->type('content', 'prado');
- $this->click('btn_before');
+ $this->type("{$base}content", 'prado');
+ $this->byId('btn_before')->click();
$this->pause(800);
- $this->assertText('subpanel', 'regexp:more\s*Sub Panel\s*something');
- $this->assertText('panel1', 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
+ $this->assertText("{$base}subpanel", 'regexp:more\s*Sub Panel\s*something');
+ $this->assertText("{$base}panel1", 'regexp:Main Panel\s*prado\s*more\s*Sub Panel\s*something');
- $this->type('content', ' php ');
- $this->click('btn_after');
+ $this->type("{$base}content", ' php ');
+ $this->byId('btn_after')->click();
$this->pause(800);
- $this->type('content', 'mauahahaha');
- $this->click('btn_replace');
+ $this->type("{$base}content", 'mauahahaha');
+ $this->byId('btn_replace')->click();
$this->pause(1000);
- $this->assertText('panel1', 'Main Panel pradomauahahahaphp');
+ $this->assertText("{$base}panel1", 'Main Panel pradomauahahahaphp');
}
*/
}
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
index 14d575fe..559c80a6 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxCallbackTestCase.php
@@ -1,15 +1,16 @@
<?php
-class TextBoxCallbackTestCase extends PradoGenericSeleniumTest
+class TextBoxCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveTextBoxCallback");
- $this->verifyTextPresent("ActiveTextBox Callback Test");
- $this->assertText("label1", "Label 1");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveTextBoxCallback");
+ $this->assertContains("ActiveTextBox Callback Test", $this->source());
+ $this->assertText("{$base}label1", "Label 1");
- $this->type("textbox1", "hello!");
+ $this->type("{$base}textbox1", "hello!");
$this->pause(800);
- $this->assertText("label1", "Label 1: hello!");
+ $this->assertText("{$base}label1", "Label 1: hello!");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
index ffc1ac72..2562a18b 100755
--- a/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TextBoxGroupValidationTestCase.php
@@ -1,22 +1,23 @@
<?php
-class TextBoxGroupValidationTestCase extends PradoGenericSeleniumTest
+class TextBoxGroupValidationTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TextBoxValidationCallback");
- $this->assertTextPresent('TextBox AutoPostBack With Group Validation');
- $this->assertNotVisible('validator1');
+ $base="ctl0_Content_";
+ $this->url("active-controls/index.php?page=TextBoxValidationCallback");
+ $this->assertContains('TextBox AutoPostBack With Group Validation', $this->source());
+ $this->assertNotVisible("{$base}validator1");
- $this->type('ZipCode', 'test');
- $this->assertVisible('validator1');
+ $this->type("{$base}ZipCode", 'test');
+ $this->assertVisible("{$base}validator1");
- $this->type('Address', 'Sydney');
- $this->type('ZipCode', '2000');
+ $this->type("{$base}Address", 'Sydney');
+ $this->type("{$base}ZipCode", '2000');
- $this->assertNotVisible('validator1');
+ $this->assertNotVisible("{$base}validator1");
$this->pause(800);
- $this->assertValue('City', 'City: Sydney Zip: 2000');
+ $this->assertValue("{$base}City", 'City: Sydney Zip: 2000');
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
index de0ecad8..741c7a2d 100755
--- a/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/TimeTriggeredCallbackTestCase.php
@@ -1,19 +1,20 @@
<?php
-class TimeTriggeredCallbackTestCase extends PradoGenericSeleniumTest
+class TimeTriggeredCallbackTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=TimeTriggeredCallbackTest");
- $this->verifyTextPresent("TimeTriggeredCallback + ViewState Tests");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=TimeTriggeredCallbackTest");
+ $this->assertContains("TimeTriggeredCallback + ViewState Tests", $this->source());
- $this->assertText("label1", "ViewState Counter :");
+ $this->assertText("{$base}label1", "ViewState Counter :");
- $this->click("button1");
+ $this->byId("{$base}button1")->click();
$this->pause(8000);
- $this->assertText("label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10");
+ $this->assertText("{$base}label1", "ViewState Counter : 1 2 3 4 5 6 7 8 9 10");
}
}
diff --git a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
index 5113cc92..8b0428a9 100755
--- a/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ValueTriggerCallbackTestCase.php
@@ -1,20 +1,21 @@
<?php
-class ValueTriggerTestCase extends PradoGenericSeleniumTest
+class ValueTriggerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ValueTriggerCallbackTest");
- $this->verifyTextPresent("Value Trigger Callback Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ValueTriggerCallbackTest");
+ $this->assertContains("Value Trigger Callback Test", $this->source());
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}label1", 'Label 1');
- $this->type('text1', 'test');
+ $this->type("{$base}text1", 'test');
$this->pause(2000);
- $this->assertText('label1', 'Old = : New Value = test');
+ $this->assertText("{$base}label1", 'Old = : New Value = test');
- $this->type('text1', 'more');
+ $this->type("{$base}text1", 'more');
$this->pause(3000);
- $this->assertText('label1', 'Old = test : New Value = more');
+ $this->assertText("{$base}label1", 'Old = test : New Value = more');
}
}
diff --git a/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php
index ef82eaa3..2b9a0166 100755
--- a/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php
+++ b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php
@@ -1,242 +1,250 @@
<?php
/**
* ActiveRatingListTestCase.php
- *
+ *
* @author Bradley Booms <Bradley.Booms@nsighttel.com>
* @version Creation Date: Oct 22, 2008
*/
/**
* ActiveRatingListTestCase.php class
- *
- *
- *
+ *
+ *
+ *
* Properties
* -
- *
+ *
* @author Bradley Booms <Bradley.Booms@nsighttel.com>
* @version Modified Date: Oct 22, 2008
- *
+ *
* Modifications:
*/
-class ActiveRatingListTestCase extends PradoGenericSeleniumTest
+class ActiveRatingListTestCase extends PradoGenericSelenium2Test
{
function testCheckBoxes()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListCheckBoxesTest");
- $this->verifyTextPresent("TActiveRatingList Check Boxes Test Case");
- $this->assertCheckBoxes("RatingList", array(2), 6);
-
+ $this->url("active-controls/index.php?page=ActiveRatingListCheckBoxesTest");
+ $this->assertContains("TActiveRatingList Check Boxes Test Case", $this->source());
+ $this->assertCheckBoxes("{$base}RatingList", array(2), 6);
+
// Change the list and make sure the radio buttons get updated properly.
- $this->clickTD("RatingList_c4");
+ $this->clickTD("{$base}RatingList_c4");
$this->pause(800);
- $this->assertCheckBoxes("RatingList", array(4), 6);
-
- $this->clickTD("RatingList_c2");
+ $this->assertCheckBoxes("{$base}RatingList", array(4), 6);
+
+ $this->clickTD("{$base}RatingList_c2");
$this->pause(800);
- $this->assertCheckBoxes("RatingList", array(2), 6);
+ $this->assertCheckBoxes("{$base}RatingList", array(2), 6);
}
function testRating()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListRatingTest");
- $this->verifyTextPresent("TActiveRatingList Rating Test Case");
-
+ $this->url("active-controls/index.php?page=ActiveRatingListRatingTest");
+ $this->assertContains("TActiveRatingList Rating Test Case", $this->source());
+
// Check the list, make sure it starts out with 5 stars.
- $this->assertText("Status", "Rating: 5");
-
+ $this->assertText("{$base}Status", "Rating: 5");
+
// Click on 1 star and make sure the Rating property updates.
- $this->clickTD("RatingList_c0");
+ $this->clickTD("{$base}RatingList_c0");
$this->pause(800);
- $this->assertText("Status", "Rating: 1");
-
+ $this->assertText("{$base}Status", "Rating: 1");
+
// Then set Rating to three on the server side and make sure it's correct.
- $this->click("SetRating");
+ $this->byId("{$base}SetRating")->click();
$this->pause(800);
- $this->assertText("Status", "Rating: 3");
+ $this->assertText("{$base}Status", "Rating: 3");
}
function testSelectedIndex()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListSelectedIndexTest");
- $this->verifyTextPresent("TActiveRatingList SelectedIndex Test Case");
- $this->assertText("Status", " SelectedIndex: 1");
-
+ $this->url("active-controls/index.php?page=ActiveRatingListSelectedIndexTest");
+ $this->assertContains("TActiveRatingList SelectedIndex Test Case", $this->source());
+ $this->assertText("{$base}Status", "SelectedIndex: 1");
+
// Click on 5 stars and make sure the SelectedIndex property updates.
- $this->clickTD("RatingList_c4");
+ $this->clickTD("{$base}RatingList_c4");
$this->pause(800);
- $this->assertText("Status", " SelectedIndex: 4");
-
+ $this->assertText("{$base}Status", "SelectedIndex: 4");
+
// Then set SelectedIndex to 5 on the server side and make sure it's correct.
- $this->click("SetSelectedIndex");
+ $this->byId("{$base}SetSelectedIndex")->click();
$this->pause(800);
- $this->assertText("Status", " SelectedIndex: 5");
+ $this->assertText("{$base}Status", "SelectedIndex: 5");
}
function testAutoPostBack()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListAutoPostBackTest");
- $this->verifyTextPresent("TActiveRatingList AutoPostBack Test Case");
- $this->assertText("Status", "AutoPostback=false");
-
+ $this->url("active-controls/index.php?page=ActiveRatingListAutoPostBackTest");
+ $this->assertContains("TActiveRatingList AutoPostBack Test Case", $this->source());
+ $this->assertText("{$base}Status", "AutoPostback=false");
+
// Make sure that it doesn't auto post when clicked.
- $this->clickTD("RatingList_c3");
+ $this->clickTD("{$base}RatingList_c3");
$this->pause(800);
- $this->assertText("Status", "AutoPostback=false");
-
+ $this->assertText("{$base}Status", "AutoPostback=false");
+
// Then submit with an active button and make sure it updates.
- $this->click("Submit");
+ $this->byId("{$base}Submit")->click();
$this->pause(800);
- $this->assertText("Status", "4 : Good");
+ $this->assertText("{$base}Status", "4 : Good");
}
function testAllowInput()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListAllowInputTest");
- $this->verifyTextPresent("TActiveRatingList AllowInput Test Case");
- $this->assertText("Status", "AllowInput=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
+ $this->url("active-controls/index.php?page=ActiveRatingListAllowInputTest");
+ $this->assertContains("TActiveRatingList AllowInput Test Case", $this->source());
+ $this->assertText("{$base}Status", "AllowInput=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(3), 6);
// Make sure that clicking doesn't change anything.
- $this->clickTD("RatingList_c5");
+ $this->clickTD("{$base}RatingList_c5");
$this->pause(800);
- $this->assertText("Status", "AllowInput=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
+ $this->assertText("{$base}Status", "AllowInput=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(3), 6);
}
function testReadOnly()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListReadOnlyTest");
- $this->verifyTextPresent("TActiveRatingList ReadOnly Test Case");
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(0), 6);
+ $this->url("active-controls/index.php?page=ActiveRatingListReadOnlyTest");
+ $this->assertContains("TActiveRatingList ReadOnly Test Case", $this->source());
+ $this->assertText("{$base}Status", "ReadOnly=true");
+ $this->assertCheckBoxes("{$base}RatingList", array(0), 6);
- $this->clickTD("RatingList_c4");
+ $this->clickTD("{$base}RatingList_c4");
$this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(0), 6);
-
+ $this->assertText("{$base}Status", "ReadOnly=true");
+ $this->assertCheckBoxes("{$base}RatingList", array(0), 6);
+
// Then set ReadOnly to false, and make sure it works.
- $this->click("Writable");
+ $this->byId("{$base}Writable")->click();
$this->pause(800);
- $this->assertText("Status", "ReadOnly=false");
- $this->assertCheckBoxes("RatingList", array(0), 6);
-
-
- $this->clickTD("RatingList_c1");
+ $this->assertText("{$base}Status", "ReadOnly=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(0), 6);
+
+
+ $this->clickTD("{$base}RatingList_c1");
$this->pause(800);
- $this->assertText("Status", "2 : Fair");
- $this->assertCheckBoxes("RatingList", array(1), 6);
-
+ $this->assertText("{$base}Status", "2 : Fair");
+ $this->assertCheckBoxes("{$base}RatingList", array(1), 6);
+
// Then set ReadOnly to true, and make sure it doesn't work anymore.
- $this->click("ReadOnly");
+ $this->byId("{$base}ReadOnly")->click();
$this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(1), 6);
-
-
- $this->clickTD("RatingList_c2");
+ $this->assertText("{$base}Status", "ReadOnly=true");
+ $this->assertCheckBoxes("{$base}RatingList", array(1), 6);
+
+
+ $this->clickTD("{$base}RatingList_c2");
$this->pause(800);
- $this->assertText("Status", "ReadOnly=true");
- $this->assertCheckBoxes("RatingList", array(1), 6);
+ $this->assertText("{$base}Status", "ReadOnly=true");
+ $this->assertCheckBoxes("{$base}RatingList", array(1), 6);
}
function testEnabled()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListEnabledTest");
- $this->verifyTextPresent("TActiveRatingList Enabled Test Case");
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(5), 6);
+ $this->url("active-controls/index.php?page=ActiveRatingListEnabledTest");
+ $this->assertContains("TActiveRatingList Enabled Test Case", $this->source());
+ $this->assertText("{$base}Status", "Enabled=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(5), 6);
- $this->clickTD("RatingList_c4");
+ $this->clickTD("{$base}RatingList_c4");
$this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(5), 6);
-
+ $this->assertText("{$base}Status", "Enabled=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(5), 6);
+
// Then set Enable to true, and make sure it works.
- $this->click("Enable");
+ $this->byId("{$base}Enable")->click();
$this->pause(800);
- $this->assertText("Status", "Enabled=true");
- $this->assertCheckBoxes("RatingList", array(5), 6);
-
-
- $this->clickTD("RatingList_c3");
+ $this->assertText("{$base}Status", "Enabled=true");
+ $this->assertCheckBoxes("{$base}RatingList", array(5), 6);
+
+
+ $this->clickTD("{$base}RatingList_c3");
$this->pause(800);
- $this->assertText("Status", "4 : Good");
- $this->assertCheckBoxes("RatingList", array(3), 6);
-
+ $this->assertText("{$base}Status", "4 : Good");
+ $this->assertCheckBoxes("{$base}RatingList", array(3), 6);
+
// Then set Enable to false, and make sure it doesn't work anymore.
- $this->click("Disable");
+ $this->byId("{$base}Disable")->click();
$this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
-
-
- $this->clickTD("RatingList_c5");
+ $this->assertText("{$base}Status", "Enabled=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(3), 6);
+
+
+ $this->clickTD("{$base}RatingList_c5");
$this->pause(800);
- $this->assertText("Status", "Enabled=false");
- $this->assertCheckBoxes("RatingList", array(3), 6);
+ $this->assertText("{$base}Status", "Enabled=false");
+ $this->assertCheckBoxes("{$base}RatingList", array(3), 6);
}
-
+
function testHoverCaption()
{
+ $base='ctl0_Content_';
// Verify we're on the right page.
- $this->open("active-controls/index.php?page=ActiveRatingListHoverCaptionTest");
- $this->verifyTextPresent("TActiveRatingList Hover Caption Test Case");
- $this->assertText("Status", "CaptionID='Status'");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[contains(@class, 'rating_half')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../../../td[contains(@class, 'rating')]");
-
- $this->mouseOver("//input[@id='RatingList_c4']/../../");
- $this->assertText("Status", "Excellent");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../../../td[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../../../td[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../../../td[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../../../td[contains(@class, 'rating_hover')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../../../td[not(contains(@class, 'rating_hover'))]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../../../td[contains(@class, 'rating')]");
-
- $this->mouseOut("//input[@id='RatingList_c4']/../../");
- $this->assertText("Status", "CaptionID='Status'");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[not(contains(@class, 'rating_selected'))]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../../../td[contains(@class, 'rating')]");
-
-
- $this->mouseOver("//input[@id='RatingList_c1']/../../");
- $this->assertText("Status", "Fair");
-
- $this->click("//input[@id='RatingList_c1']/../../");
- $this->pause(800);
- $this->assertText("Status", "2 : Fair");
- $this->assertElementPresent("//input[@id='RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../../../td[not(contains(@class, 'rating_selected'))]");
- $this->assertElementPresent("//input[@id='RatingList_c2']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c3']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c4']/../../../td[contains(@class, 'rating')]");
- $this->assertElementPresent("//input[@id='RatingList_c5']/../../../td[contains(@class, 'rating')]");
+ $this->url("active-controls/index.php?page=ActiveRatingListHoverCaptionTest");
+ $this->assertContains("TActiveRatingList Hover Caption Test Case", $this->source());
+ $this->assertText("{$base}Status", "CaptionID='Status'");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c2']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[contains(@class, 'rating_half')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c4']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c5']/../../../td[contains(@class, 'rating')]");
+
+ $this->moveto($this->byXPath("//input[@id='{$base}RatingList_c4']/../.."));
+ $this->assertText("{$base}Status", "Excellent");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c0']/../../../td[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c1']/../../../td[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c2']/../../../td[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c4']/../../../td[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c5']/../../../td[not(contains(@class, 'rating_hover'))]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c5']/../../../td[contains(@class, 'rating')]");
+
+ $this->moveto($this->byCssSelector('body'));
+ $this->assertText("{$base}Status", "CaptionID='Status'");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c2']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[not(contains(@class, 'rating_selected'))]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c4']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c5']/../../../td[contains(@class, 'rating')]");
+
+
+ $this->moveto($this->byXPath("//input[@id='{$base}RatingList_c1']/../.."));
+ $this->assertText("{$base}Status", "Fair");
+
+ $this->byXPath("//input[@id='{$base}RatingList_c1']/../..")->click();
+ $this->pause(800);
+ $this->assertText("{$base}Status", "2 : Fair");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c0']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c1']/../../../td[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c2']/../../../td[not(contains(@class, 'rating_selected'))]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c2']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c3']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c4']/../../../td[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='{$base}RatingList_c5']/../../../td[contains(@class, 'rating')]");
}
-
+
function clickTD($clientID){
- $this->click("//input[@id='{$clientID}']/../..");
+ $this->byXPath("//input[@id='{$clientID}']/../..")->click();
}
function assertCheckBoxes($clientID, $checks, $total = 5)
@@ -244,9 +252,9 @@ class ActiveRatingListTestCase extends PradoGenericSeleniumTest
for($i = 0; $i < $total; $i++)
{
if(in_array($i, $checks))
- $this->assertChecked("{$clientID}_c{$i}");
+ $this->assertTrue($this->byId("{$clientID}_c{$i}")->selected());
else
- $this->assertNotChecked("{$clientID}_c{$i}");
+ $this->assertFalse($this->byId("{$clientID}_c{$i}")->selected());
}
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/controls/Layout.tpl b/tests/FunctionalTests/features/protected/controls/Layout.tpl
index dbd433b8..66b42f6c 100755
--- a/tests/FunctionalTests/features/protected/controls/Layout.tpl
+++ b/tests/FunctionalTests/features/protected/controls/Layout.tpl
@@ -27,7 +27,6 @@
<body>
<com:TForm>
<com:TContentPlaceHolder ID="Content" />
-<com:TJavascriptLogger />
</com:TForm>
</body>
</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
index d4a98e26..5292affb 100755
--- a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
+++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
@@ -22,23 +22,23 @@ class BasicI18N extends TPage
* @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
* @package ${package}
*//*
-class BasicI18NTestCase extends PradoGenericSeleniumTest
+class BasicI18NTestCase extends PradoGenericSelenium2Test
{
function setup()
{
$page = Prado::getApplication()->getTestPage(__FILE__);
- $this->open($page);
+ $this->url($page);
}
function testI18N()
{
- $this->verifyTitle("Basic I18N Test", "");
- $this->verifyTextPresent("Hello", "");
- $this->verifyTextPresent("US$10,000.00", "");
- $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", "");
- $this->verifyTextPresent("None", "");
- $this->verifyTextPresent("One thing.", "");
- $this->verifyTextPresent("Many things.", "");
+ $this->assertEquals("Basic I18N Test", $this->title());
+ $this->assertContains("Hello", $this->source());
+ $this->assertContains("US$10,000.00", $this->source());
+ $this->assertContains("2006年1月15日 上午12时00分00秒", $this->source());
+ $this->assertContains("None", $this->source());
+ $this->assertContains("One thing.", $this->source());
+ $this->assertContains("Many things.", $this->source());
}
}
*/ \ No newline at end of file
diff --git a/tests/FunctionalTests/features/tests/MyTestCase.php b/tests/FunctionalTests/features/tests/MyTestCase.php
index 92b0886a..d748b6b0 100755
--- a/tests/FunctionalTests/features/tests/MyTestCase.php
+++ b/tests/FunctionalTests/features/tests/MyTestCase.php
@@ -1,10 +1,10 @@
<?php
-class MyTestCase extends PradoGenericSeleniumTest
+class MyTestCase extends PradoGenericSelenium2Test
{
function test1()
{
- $this->open('http://127.0.0.1');
- $this->assertTextNotPresent('asd');
+ $this->url('http://127.0.0.1');
+ $this->assertNotContains('asd', $this->source());
}
}
diff --git a/tests/FunctionalTests/issues/assets/.gitignore b/tests/FunctionalTests/issues/assets/.gitignore
new file mode 100755
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/FunctionalTests/issues/assets/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/FunctionalTests/issues/index.php b/tests/FunctionalTests/issues/index.php
new file mode 100755
index 00000000..77ddf367
--- /dev/null
+++ b/tests/FunctionalTests/issues/index.php
@@ -0,0 +1,6 @@
+<?php
+
+require_once(dirname(__FILE__).'/../../../framework/prado.php');
+
+$app=new TApplication;
+$app->run();
diff --git a/tests/FunctionalTests/issues/protected/application.xml b/tests/FunctionalTests/issues/protected/application.xml
new file mode 100755
index 00000000..a396dea5
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/application.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<application id="FeatureTests" Mode="Debug">
+ <paths>
+ <using namespace="Application.controls.*" />
+ </paths>
+ <services>
+ <service id="page" class="TPageService">
+ <pages MasterClass="Application.controls.Layout" />
+ </service>
+ </services>
+</application> \ No newline at end of file
diff --git a/tests/FunctionalTests/issues/protected/controls/Layout.php b/tests/FunctionalTests/issues/protected/controls/Layout.php
new file mode 100755
index 00000000..0ac4d6b3
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/controls/Layout.php
@@ -0,0 +1,6 @@
+<?php
+
+class Layout extends TTemplateControl
+{
+
+}
diff --git a/tests/FunctionalTests/issues/protected/controls/Layout.tpl b/tests/FunctionalTests/issues/protected/controls/Layout.tpl
new file mode 100755
index 00000000..5234c565
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/controls/Layout.tpl
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<com:THead Title="PRADO Feature Tests">
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ }
+ .w3c
+ {
+ margin-top: 2em;
+ display: block;
+ }
+ .required
+ {
+ border:1px solid red;
+ background-color: #fdd;
+ }
+ /*]]>*/
+ </style>
+</com:THead>
+<body>
+<com:TForm>
+<com:TContentPlaceHolder ID="Content" />
+</com:TForm>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.page b/tests/FunctionalTests/issues/protected/pages/Issue504.page
new file mode 100755
index 00000000..ed29b358
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue504.page
@@ -0,0 +1,14 @@
+ <com:TContent ID="Content">
+ <h1>Issue 504 Test</h1>
+
+ <com:TPanel ID="dlg" DefaultButton="subPanel.buttonOk" >
+ <com:TTextBox ID="textbox1" />
+ <com:TButton ID="buttonDummy" OnCommand="buttonDummyClick" Text="Dummy button" />
+ Panel Content
+ <com:TLabel ID="label1" />
+ <com:TPanel ID="subPanel" >
+ <com:TButton ID="buttonOk" OnCommand="buttonOkClick" Text="Ok button" />
+ </com:TPanel>
+ </com:TPanel>
+ </com:TContent>
+
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.php b/tests/FunctionalTests/issues/protected/pages/Issue504.php
new file mode 100755
index 00000000..dd12c960
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue504.php
@@ -0,0 +1,14 @@
+<?php
+
+class Issue504 extends TPage
+{
+ function buttonOkClick($sender, $param)
+ {
+ $this->label1->Text="buttonOkClick";
+ }
+
+ function buttonDummyClick($sender, $param)
+ {
+ $this->label1->Text="buttonDummyClick";
+ }
+}
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue516.page b/tests/FunctionalTests/issues/protected/pages/Issue516.page
new file mode 100644
index 00000000..c922c6e1
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue516.page
@@ -0,0 +1,50 @@
+ <com:TContent ID="Content">
+
+<h1>Issue 516 Test</h1>
+
+<com:TActiveDataGrid
+ Width="800px"
+ CellPadding="2"
+ ID="DataGrid"
+ DataKeyField="ISBN"
+ AutoGenerateColumns="false"
+ HeaderStyle.BackColor="black"
+ HeaderStyle.ForeColor="white"
+ ItemStyle.BackColor="#BFCFFF"
+ ItemStyle.Font.Italic="true"
+ AlternatingItemStyle.BackColor="#E6ECFF"
+ EditItemStyle.BackColor="lightyellow"
+ OnEditCommand="editItem"
+ OnUpdateCommand="saveItem"
+ OnCancelCommand="cancelItem"
+ >
+ <com:TTemplateColumn
+ ID="BookTitleColumn"
+ HeaderText="Book Title"
+ HeaderStyle.Width="400px"
+ >
+ <prop:ItemTemplate>
+ <com:TLiteral Text="<%# $this->Parent->Data['title'] %>" Encode="true" />
+ </prop:ItemTemplate>
+ <prop:EditItemTemplate>
+ <com:TTextBox ID="TextBox" Text="<%# $this->Parent->Data['title'] %>" />
+ <com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="<br/>Please provide a title."
+ ValidationGroup = "Group1"
+ />
+ </prop:EditItemTemplate>
+ </com:TTemplateColumn>
+ <com:TActiveEditCommandColumn
+ HeaderText="Edit"
+ HeaderStyle.Width="100px"
+ UpdateText="Save"
+ ItemStyle.HorizontalAlign="Center"
+ ItemStyle.Font.Italic="false"
+ ValidationGroup = "Group1"
+ />
+</com:TActiveDataGrid>
+
+ </com:TContent>
+
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue516.php b/tests/FunctionalTests/issues/protected/pages/Issue516.php
new file mode 100644
index 00000000..bd3e7a72
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue516.php
@@ -0,0 +1,115 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Issue516 extends TPage
+{
+ private $_data=null;
+
+ protected function getData()
+ {
+ if($this->_data===null)
+ $this->loadData();
+ return $this->_data;
+ }
+
+ protected function loadData()
+ {
+ // We use viewstate keep track of data.
+ // In real applications, data should come from database using an SQL SELECT statement.
+ // In the following tabular data, field 'ISBN' is the primary key.
+ // All update and delete operations should come with an 'id' value in order to go through.
+ if(($this->_data=$this->getViewState('Data',null))===null)
+ {
+ $this->_data=array(
+ array(
+ 'ISBN'=>'0596007124',
+ 'title'=>'',
+ ),
+ array(
+ 'ISBN'=>'0201633612',
+ 'title'=>'Design Patterns: Elements of Reusable Object-Oriented Software',
+ ),
+ array(
+ 'ISBN'=>'0321247140',
+ 'title'=>'Design Patterns Explained : A New Perspective on Object-Oriented Design',
+ ),
+ array(
+ 'ISBN'=>'0201485672',
+ 'title'=>'Refactoring: Improving the Design of Existing Code',
+ ),
+ array(
+ 'ISBN'=>'0321213351',
+ 'title'=>'Refactoring to Patterns',
+ ),
+ array(
+ 'ISBN'=>'0735619670',
+ 'title'=>'Code Complete',
+ ),
+ array(
+ 'ISBN'=>'0321278658 ',
+ 'title'=>'Extreme Programming Explained : Embrace Change',
+ ),
+ );
+ $this->saveData();
+ }
+ }
+
+ protected function saveData()
+ {
+ $this->setViewState('Data',$this->_data);
+ }
+
+ protected function updateBook($isbn,$title)
+ {
+ // In real applications, data should be saved to database using an SQL UPDATE statement
+ if($this->_data===null)
+ $this->loadData();
+ $updateRow=null;
+ foreach($this->_data as $index=>$row)
+ if($row['ISBN']===$isbn)
+ $updateRow=&$this->_data[$index];
+ if($updateRow!==null)
+ {
+ $updateRow['title']=$title;
+ $this->saveData();
+ }
+ }
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack && !$this->IsCallBack)
+ {
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+ }
+
+ public function editItem($sender,$param)
+ {
+ $this->DataGrid->EditItemIndex=$param->Item->ItemIndex;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function saveItem($sender,$param)
+ {
+ $item=$param->Item;
+ $this->updateBook(
+ $this->DataGrid->DataKeys[$item->ItemIndex], // ISBN
+ $item->BookTitleColumn->TextBox->Text // title
+ );
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function cancelItem($sender,$param)
+ {
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+}
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.page b/tests/FunctionalTests/issues/protected/pages/Issue524.page
new file mode 100755
index 00000000..08ac1814
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue524.page
@@ -0,0 +1,7 @@
+<com:TContent ID="Content">
+ <h1>Issue 524 Test</h1>
+ <com:TTextBox ID="textbox1" />
+ <com:TActiveButton ID="buttonOk" Text="Ok button" />
+ <com:TActiveCustomValidator ID="Validator" ControlToValidate="textbox1" OnServerValidate="validateText" Text="Input is invalid." />
+</com:TContent>
+
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.php b/tests/FunctionalTests/issues/protected/pages/Issue524.php
new file mode 100755
index 00000000..851ff45a
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue524.php
@@ -0,0 +1,20 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Issue524 extends TPage
+{
+
+ public function __construct() {
+ Prado::getApplication()->getGlobalization()->setCharset('ISO-8859-1');
+ parent::__construct();
+ }
+
+ public function validateText($sender, $param)
+ {
+ $param->IsValid = false;
+ $iso8859text=iconv('utf-8', 'iso-8859-1', 'fünf');
+ $this->Validator->ErrorMessage = $iso8859text;
+ }
+
+}
diff --git a/tests/FunctionalTests/issues/protected/runtime/.gitignore b/tests/FunctionalTests/issues/protected/runtime/.gitignore
new file mode 100755
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/runtime/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/FunctionalTests/issues/tests/Issue504TestCase.php b/tests/FunctionalTests/issues/tests/Issue504TestCase.php
new file mode 100755
index 00000000..dff27339
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue504TestCase.php
@@ -0,0 +1,16 @@
+<?php
+
+class Issue504TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue504');
+ $this->assertContains('Issue 504 Test', $this->source());
+ $base='ctl0_Content_';
+
+ $this->byID("{$base}textbox1")->click();
+ $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER);
+
+ $this->assertText("{$base}label1", "buttonOkClick");
+ }
+}
diff --git a/tests/FunctionalTests/issues/tests/Issue516TestCase.php b/tests/FunctionalTests/issues/tests/Issue516TestCase.php
new file mode 100644
index 00000000..363e9f84
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue516TestCase.php
@@ -0,0 +1,37 @@
+<?php
+
+class Issue516TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue516');
+ $this->assertContains('Issue 516 Test', $this->source());
+ $base='ctl0_Content_';
+ $row1='DataGrid_ctl1_';
+ $row2='DataGrid_ctl2_';
+
+ // click "edit" and check for textbox
+ $this->byID("{$base}{$row1}ctl3")->click();
+ $this->pause(800);
+ $this->assertElementPresent("{$base}{$row1}TextBox");
+ // click "save" and check for validator
+ $this->byID("{$base}{$row1}ctl3")->click();
+ $this->pause(800);
+ $this->assertEquals('Please provide a title.', $this->getElement("{$base}{$row1}ctl1")->text());
+ // click "cancel" and ensure validator has disappeared
+ $this->byID("{$base}{$row1}ctl4")->click();
+ $this->pause(800);
+ $this->assertElementNotPresent("{$base}{$row1}ctl1");
+
+ // click "edit" and check for textbox on the second row
+ $this->byID("{$base}{$row2}ctl3")->click();
+ $this->pause(800);
+ $this->assertTrue($this->getElement("{$base}{$row2}TextBox")!==null);
+ // click "save" and ensure bvalidation has been successfull
+ $this->byID("{$base}{$row2}ctl3")->click();
+ $this->pause(800);
+ $this->assertElementNotPresent("{$base}{$row2}ctl1");
+ $this->assertElementNotPresent("{$base}{$row2}TextBox");
+ $this->assertEquals('Edit', $this->getElement("{$base}{$row2}ctl3")->text());
+ }
+}
diff --git a/tests/FunctionalTests/issues/tests/Issue524TestCase.php b/tests/FunctionalTests/issues/tests/Issue524TestCase.php
new file mode 100755
index 00000000..b7b022b2
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue524TestCase.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Testcase for Issue 524
+ * Encoding issues caused an error when serializing the
+ * response
+ **/
+class Issue524TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue524');
+ $this->assertContains('Issue 524 Test', $this->source());
+ $base='ctl0_Content_';
+
+ $this->byID("{$base}buttonOk")->click();
+ $this->pause(800);
+ $this->assertText("{$base}Validator", "fünf");
+ }
+}
diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php
index 03861440..9d816978 100755
--- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php
+++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php
@@ -1,36 +1,36 @@
<?php
//$Id: ActiveButtonTestCase.php 3187 2012-07-12 11:21:01Z ctrlaltca $
-class QuickstartActiveButtonTestCase extends PradoGenericSeleniumTest
+class QuickstartActiveButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&amp;notheme=true&amp;lang=en");
+ $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- $this->assertTextPresent('TActiveButton Samples (AJAX)');
+ $this->assertContains('TActiveButton Samples (AJAX)', $this->source());
// a click button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
- $this->click("//input[@type='submit' and @value='click me']", "");
+ $this->assertElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
+ $this->byXPath("//input[@type='submit' and @value='click me']")->click();
$this->pause(800);
- $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
+ $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
// a command button
- $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
- $this->click("//input[@type='submit' and @value='click me']", "");
+ $this->assertElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
+ $this->byXPath("//input[@type='submit' and @value='click me']")->click();
$this->pause(800);
- $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
+ $this->assertElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]");
// a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->click("//input[@type='submit' and @value='submit']", "");
+ $this->assertNotVisible('ctl0_body_ctl2');
+ $this->byXPath("//input[@type='submit' and @value='submit']")->click();
$this->pause(800);
- $this->verifyVisible('ctl0_body_ctl2');
+ $this->assertVisible('ctl0_body_ctl2');
$this->type("ctl0\$body\$TextBox", "test");
- $this->click("//input[@type='submit' and @value='submit']", "");
+ $this->byXPath("//input[@type='submit' and @value='submit']")->click();
$this->pause(800);
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", "");
+ $this->assertNotVisible('ctl0_body_ctl2');
+ $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", "");
}
}
diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php
index 257917ec..9e537abd 100755
--- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php
@@ -1,58 +1,57 @@
<?php
//$Id: ActiveCheckBoxTestCase.php 3187 2012-07-12 11:21:01Z ctrlaltca $
-class QuickstartActiveCheckBoxTestCase extends PradoGenericSeleniumTest
+class QuickstartActiveCheckBoxTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->setSpeed(500);
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- $this->assertTextPresent('TActiveCheckBox Samples (AJAX)');
+ $this->assertContains('TActiveCheckBox Samples (AJAX)', $this->source());
// an auto postback checkbox
- $this->verifyTextNotPresent("ctl0_body_ctl0 clicked using callback");
- $this->click("//input[@name='ctl0\$body\$ctl0']");
+ $this->assertNotContains("ctl0_body_ctl0 clicked using callback", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click();
$this->pause(800);
- $this->assertChecked("//input[@name='ctl0\$body\$ctl0']");
- $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback");
- $this->click("//input[@name='ctl0\$body\$ctl0']");
+ $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected());
+ $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click();
$this->pause(800);
- $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback");
- $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']");
+ $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source());
+ $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected());
// a checkbox causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl1');
- $this->click("//input[@name='ctl0\$body\$ctl2']");
- $this->verifyVisible('ctl0_body_ctl1');
- $this->click("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyVisible('ctl0_body_ctl3');
+ $this->assertNotVisible('ctl0_body_ctl1');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click();
+ $this->assertVisible('ctl0_body_ctl1');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click();
+ $this->assertVisible('ctl0_body_ctl3');
$this->type("ctl0\$body\$TextBox", "test");
- $this->click("//input[@name='ctl0\$body\$ctl2']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click();
$this->pause(800);
- $this->verifyNotVisible('ctl0_body_ctl1');
- $this->assertTextPresent("ctl0_body_ctl2 clicked using callback");
+ $this->assertNotVisible('ctl0_body_ctl1');
+ $this->assertContains("ctl0_body_ctl2 clicked using callback", $this->source());
// a checkbox validated by a required field validator
- $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']");
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->click("//input[@type='submit' and @value='Submit']", "");
- $this->verifyVisible('ctl0_body_ctl4');
- $this->click("//input[@name='ctl0\$body\$CheckBox']", "");
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox']");
- $this->click("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->assertTextPresent("ctl0_body_CheckBox clicked");
+ $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected());
+ $this->assertNotVisible('ctl0_body_ctl4');
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertVisible('ctl0_body_ctl4');
+ $this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->click();
+ $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected());
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->pause(800);
+ $this->assertNotVisible('ctl0_body_ctl4');
+ $this->assertContains("ctl0_body_CheckBox clicked", $this->source());
// a checkbox validated by a required field validator using AutoPostBack
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']");
- $this->verifyNotVisible('ctl0_body_ctl5');
- $this->click("//input[@name='ctl0\$body\$CheckBox2']", "");
- $this->verifyVisible('ctl0_body_ctl5');
- $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']");
- $this->setSpeed(0);
+ $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected());
+ $this->assertNotVisible('ctl0_body_ctl5');
+ $this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->click();
+ $this->assertVisible('ctl0_body_ctl5');
+ $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected());
}
}
diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php
index 967842b0..7cb29382 100755
--- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php
+++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php
@@ -1,19 +1,19 @@
<?php
//$Id: ActiveButtonTestCase.php 1405 2006-09-10 01:03:56Z wei $
-class QuickstartActiveCustomValidatorTestCase extends PradoGenericSeleniumTest
+class QuickstartActiveCustomValidatorTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&amp;notheme=true&amp;lang=en");
+ $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- $this->assertTextPresent('TActiveCustomValidator Samples (AJAX)');
+ $this->assertContains('TActiveCustomValidator Samples (AJAX)', $this->source());
$base = 'ctl0_body_';
$this->assertNotVisible($base.'validator1');
- $this->click($base.'button1');
+ $this->byId($base.'button1')->click();
$this->pause(800);
$this->assertVisible($base.'validator1');
@@ -25,7 +25,7 @@ class QuickstartActiveCustomValidatorTestCase extends PradoGenericSeleniumTest
$this->pause(800);
$this->assertVisible($base.'validator1');
- $this->click($base.'button1');
+ $this->byId($base.'button1')->click();
$this->pause(800);
$this->assertNotVisible($base.'validator1');
}
diff --git a/tests/FunctionalTests/quickstart/Advanced/I18N.php b/tests/FunctionalTests/quickstart/Advanced/I18N.php
index 726501ce..ccb8c961 100755
--- a/tests/FunctionalTests/quickstart/Advanced/I18N.php
+++ b/tests/FunctionalTests/quickstart/Advanced/I18N.php
@@ -1,52 +1,52 @@
<?php
//New Test
-class QuickstartI18NTestCase extends PradoGenericSeleniumTest
+class QuickstartI18NTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&amp;lang=en&amp;notheme=true", "");
- $this->verifyTextPresent("Internationlization in PRADO", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("$12.40", "");
- $this->verifyTextPresent("€100.00", "");
- $this->verifyTextPresent("December 6, 2004", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=zh&amp;notheme=true", "");
- $this->verifyTextPresent("PRADO 国际化", "");
- $this->verifyTextPresent("2004 十二月", "");
- $this->verifyTextPresent("US$ 12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00 ", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=zh_TW&amp;notheme=true", "");
- $this->verifyTextPresent("PRADO 國際化", "");
- $this->verifyTextPresent("2004年12月6日", "");
- $this->verifyTextPresent("US$12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=de&amp;notheme=true", "");
- $this->verifyTextPresent("Internationalisierung in PRADO", "");
- $this->verifyTextPresent("6. Dezember 2004 ", "");
- $this->verifyTextPresent("$ 12,40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=es&amp;notheme=true", "");
- $this->verifyTextPresent("Internationlization en PRADO", "");
- $this->verifyTextPresent("6 de diciembre de 2004", "");
- $this->verifyTextPresent("US$12.40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=fr&amp;notheme=true", "");
- $this->verifyTextPresent("Internationalisation avec PRADO", "");
- $this->verifyTextPresent("6 décembre 2004", "");
- $this->verifyTextPresent("12,40 $", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
- $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=pl&amp;notheme=true", "");
- $this->verifyTextPresent("Internacjonalizacja w PRADO", "");
- $this->verifyTextPresent("6 grudnia 2004", "");
- $this->verifyTextPresent("US$ 12,40", "");
- $this->verifyTextPresent("46.412,42 €", "");
- $this->verifyTextPresent("€100.00", "");
+ $this->url("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&amp;lang=en&amp;notheme=true");
+ $this->assertContains("Internationlization in PRADO", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("$12.40", $this->source());
+ $this->assertContains("€100.00", $this->source());
+ $this->assertContains("December 6, 2004", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=zh&amp;notheme=true");
+ $this->assertContains("PRADO 国际化", $this->source());
+ $this->assertContains("2004 十二月", $this->source());
+ $this->assertContains("US$ 12.40", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00 ", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=zh_TW&amp;notheme=true");
+ $this->assertContains("PRADO 國際化", $this->source());
+ $this->assertContains("2004年12月6日", $this->source());
+ $this->assertContains("US$12.40", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=de&amp;notheme=true");
+ $this->assertContains("Internationalisierung in PRADO", $this->source());
+ $this->assertContains("6. Dezember 2004 ", $this->source());
+ $this->assertContains("$ 12,40", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=es&amp;notheme=true");
+ $this->assertContains("Internationlization en PRADO", $this->source());
+ $this->assertContains("6 de diciembre de 2004", $this->source());
+ $this->assertContains("US$12.40", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=fr&amp;notheme=true");
+ $this->assertContains("Internationalisation avec PRADO", $this->source());
+ $this->assertContains("6 décembre 2004", $this->source());
+ $this->assertContains("12,40 $", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00", $this->source());
+ $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&amp;lang=pl&amp;notheme=true");
+ $this->assertContains("Internacjonalizacja w PRADO", $this->source());
+ $this->assertContains("6 grudnia 2004", $this->source());
+ $this->assertContains("US$ 12,40", $this->source());
+ $this->assertContains("46.412,42 €", $this->source());
+ $this->assertContains("€100.00", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php
index 0b272428..a23f1d1d 100755
--- a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php
@@ -1,36 +1,36 @@
<?php
-class QuickstartBulletedListTestCase extends PradoGenericSeleniumTest
+class QuickstartBulletedListTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('item 1','');
- $this->verifyTextPresent('item 2','');
- $this->verifyTextPresent('item 3','');
- $this->verifyTextPresent('item 4','');
- $this->verifyTextPresent('google','');
- $this->verifyTextPresent('yahoo','');
- $this->verifyTextPresent('amazon','');
+ $this->assertContains('item 1', $this->source());
+ $this->assertContains('item 2', $this->source());
+ $this->assertContains('item 3', $this->source());
+ $this->assertContains('item 4', $this->source());
+ $this->assertContains('google', $this->source());
+ $this->assertContains('yahoo', $this->source());
+ $this->assertContains('amazon', $this->source());
// verify order list starting from 5
- $this->verifyElementPresent("//ol[@start='5']");
+ $this->assertElementPresent("//ol[@start='5']");
// unable to verify styles
// verify hyperlink list
- $this->verifyElementPresent("//a[@href='http://www.google.com/']");
- $this->verifyElementPresent("//a[@href='http://www.yahoo.com/']");
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/']");
+ $this->assertElementPresent("//a[@href='http://www.google.com/']");
+ $this->assertElementPresent("//a[@href='http://www.yahoo.com/']");
+ $this->assertElementPresent("//a[@href='http://www.amazon.com/']");
// verify linkbutton list
- $this->clickAndWait("id=ctl0_body_ctl40", "");
- $this->verifyTextPresent("You clicked google : http://www.google.com/.", "");
- $this->clickAndWait("id=ctl0_body_ctl41", "");
- $this->verifyTextPresent("You clicked yahoo : http://www.yahoo.com/.", "");
- $this->clickAndWait("id=ctl0_body_ctl42", "");
- $this->verifyTextPresent("You clicked amazon : http://www.amazon.com/.", "");
+ $this->byId("ctl0_body_ctl40")->click();
+ $this->assertContains("You clicked google : http://www.google.com/.", $this->source());
+ $this->byId("ctl0_body_ctl41")->click();
+ $this->assertContains("You clicked yahoo : http://www.yahoo.com/.", $this->source());
+ $this->byId("ctl0_body_ctl42")->click();
+ $this->assertContains("You clicked amazon : http://www.amazon.com/.", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php
index ad84e1d0..f5a4a979 100755
--- a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php
@@ -1,33 +1,33 @@
<?php
-class QuickstartButtonTestCase extends PradoGenericSeleniumTest
+class QuickstartButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// a regular button
- $this->clickAndWait("//input[@type='submit' and @value='text']", "");
+ $this->byXPath("//input[@type='submit' and @value='text']")->click();
// 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\"]");
+ $this->assertElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]");
+ $this->byXPath("//input[@type='submit' and @value='click me']")->click();
+ $this->assertElementPresent("//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\"]");
+ $this->assertElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]");
+ $this->byXPath("//input[@type='submit' and @value='click me']")->click();
+ $this->assertElementPresent("//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->assertNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@type='submit' and @value='submit']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
+ $this->assertVisible('ctl0_body_ctl3');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@type='submit' and @value='submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@type='submit' and @value='submit']")->click();
+ $this->assertNotVisible('ctl0_body_ctl3');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
index 242bc815..781701cf 100755
--- a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
@@ -1,17 +1,17 @@
<?php
//New Test
-class QuickstartCheckBoxListTestCase extends PradoGenericSeleniumTest
+class QuickstartCheckBoxListTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&amp;notheme=true&amp;lang=en");
// Check box list with default settings:
- $this->click("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']")->click();
// Check box list with customized cellpadding, cellspacing, color and text alignment:
- $this->click("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']")->click();
// *** Currently unable to test the following cases:
// Check box list with vertical (default) repeat direction
@@ -20,33 +20,33 @@ class QuickstartCheckBoxListTestCase extends PradoGenericSeleniumTest
// Check box list with flow layout and horizontal repeat direction:
// Check box list's behavior upon postback
- $this->click("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertContains("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", $this->source());
// Auto postback check box list
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']")->click();
+ $this->assertContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)", $this->source());
// Databind to an integer-indexed array
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: 1, Text: item 2)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']")->click();
+ $this->assertContains("Your selection is: (Index: 1, Value: 1, Text: item 2)", $this->source());
// Databind to an associative array:
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']")->click();
+ $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
// Databind with DataTextField and DataValueField specified
- $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']")->click();
+ $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
// CheckBox list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->click("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", "");
+ $this->assertNotVisible('ctl0_body_ctl8');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
+ $this->assertVisible('ctl0_body_ctl8');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", "");
- $this->verifyNotVisible('ctl0_body_ctl8');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']")->click();
+ $this->assertNotVisible('ctl0_body_ctl8');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php
index 57b50dd9..ca89b3a0 100755
--- a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php
@@ -1,53 +1,53 @@
<?php
-class QuickstartCheckBoxTestCase extends PradoGenericSeleniumTest
+class QuickstartCheckBoxTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// a regular checkbox
- $this->click("//input[@name='ctl0\$body\$ctl0']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click();
// a checkbox with customized value
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value']")->click();
// an auto postback checkbox
- $this->verifyTextNotPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
+ $this->assertNotContains("I'm clicked", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click();
+ $this->assertContains("I'm clicked", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click();
+ $this->assertContains("I'm clicked", $this->source());
// a checkbox causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4']", "");
+ $this->assertNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4']", "");
+ $this->assertVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
+ $this->assertVisible('ctl0_body_ctl3');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl4']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click();
+ $this->assertNotVisible('ctl0_body_ctl3');
// a checkbox validated by a required field validator
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("//input[@type='submit' and @value='Submit']", "");
+ $this->assertNotVisible('ctl0_body_ctl6');
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl6');
- $this->click("//input[@name='ctl0\$body\$CheckBox']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
+ $this->assertVisible('ctl0_body_ctl6');
+ $this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertNotVisible('ctl0_body_ctl6');
// a checkbox validated by a required field validator using AutoPostBack
- $this->verifyNotVisible('ctl0_body_ctl7');
- $this->click("//input[@name='ctl0\$body\$CheckBox2']", "");
+ $this->assertNotVisible('ctl0_body_ctl7');
+ $this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl7');
-// $this->clickAndWait("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']", "");
-// $this->verifyNotVisible('ctl0_body_ctl7');
+ $this->assertVisible('ctl0_body_ctl7');
+// $this->byXPath("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']")->click();
+// $this->assertNotVisible('ctl0_body_ctl7');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php
index 57ee92ae..4f4ca60a 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php
@@ -1,29 +1,29 @@
<?php
-class QuickstartDataGrid1TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid1TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('100','');
- $this->verifyTextPresent('true','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextPresent('Speaker','');
- $this->verifyTextPresent('35','');
- $this->verifyTextPresent('65','');
- $this->verifyTextPresent('false','');
+ $this->assertContains('id', $this->source());
+ $this->assertContains('name', $this->source());
+ $this->assertContains('quantity', $this->source());
+ $this->assertContains('price', $this->source());
+ $this->assertContains('imported', $this->source());
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('Motherboard', $this->source());
+ $this->assertContains('100', $this->source());
+ $this->assertContains('true', $this->source());
+ $this->assertContains('ITN019', $this->source());
+ $this->assertContains('Speaker', $this->source());
+ $this->assertContains('35', $this->source());
+ $this->assertContains('65', $this->source());
+ $this->assertContains('false', $this->source());
// verify specific table tags
- $this->verifyElementPresent("ctl0_body_DataGrid");
- $this->verifyAttribute("ctl0_body_DataGrid@cellpadding","2");
+ $this->assertElementPresent("ctl0_body_DataGrid");
+ $this->assertAttribute("ctl0_body_DataGrid@cellpadding","2");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
index 7efd69cc..548b04e3 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
@@ -1,49 +1,49 @@
<?php
-class QuickstartDataGrid2TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid2TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('Book Title','');
- $this->verifyTextPresent('Publisher','');
- $this->verifyTextPresent('Price','');
- $this->verifyTextPresent('In-stock','');
- $this->verifyTextPresent('Rating','');
+ $this->assertContains('Book Title', $this->source());
+ $this->assertContains('Publisher', $this->source());
+ $this->assertContains('Price', $this->source());
+ $this->assertContains('In-stock', $this->source());
+ $this->assertContains('Rating', $this->source());
// verify book titles
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",'');
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",'');
+ $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",'');
+ $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",'');
// verify publishers
- $this->verifyTextPresent("O'Reilly Media, Inc.",'');
- $this->verifyTextPresent("Addison-Wesley Professional",'');
+ $this->assertContains("O'Reilly Media, Inc.", $this->source());
+ $this->assertContains("Addison-Wesley Professional", $this->source());
// verify prices
- $this->verifyTextPresent("\$37.49",'');
- $this->verifyTextPresent("\$38.49",'');
+ $this->assertContains("\$37.49", $this->source());
+ $this->assertContains("\$38.49", $this->source());
// verify in-stock
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked',null);
+ $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled');
// verify ratings
- //$this->verifyElementPresent("//img[@src='images/star5.gif']",'');
- //$this->verifyElementPresent("//img[@src='images/star2.gif']",'');
+ //$this->assertElementPresent("//img[@src='images/star5.gif']",'');
+ //$this->assertElementPresent("//img[@src='images/star2.gif']",'');
// verify toggle column visibility
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextNotPresent('Head First Design Patterns','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl5','');
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextPresent('Head First Design Patterns','');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']")->click();
+ $this->assertNotContains('Head First Design Patterns', $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']")->click();
+ $this->assertElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5','');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']")->click();
+ $this->assertElementPresent('ctl0_body_DataGrid_ctl1_ctl5','');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']")->click();
+ $this->assertContains('Head First Design Patterns', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
index 2cdace20..e87b9072 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php
@@ -1,50 +1,56 @@
<?php
-class QuickstartDataGrid3TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid3TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&amp;notheme=true&amp;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->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->assertContains("Design Patterns: Elements of Reusable Object-Oriented Software", $this->source());
+ $this->assertContains("Addison-Wesley Professional", $this->source());
+ $this->assertContains("$47.04", $this->source());
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled');
+ //$this->assertElementPresent("//img[@src='images/star5.gif']",'');
// edit the 2nd row
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl7", "");
+ $this->byId("ctl0_body_DataGrid_ctl2_ctl7")->click();
$this->type("ctl0\$body\$DataGrid\$ctl2\$ctl1", "Design Pattern: Elements of Reusable Object-Oriented Software");
$this->type("ctl0\$body\$DataGrid\$ctl2\$ctl3", "Addison Wesley Professional");
$this->type("ctl0\$body\$DataGrid\$ctl2\$ctl5", "\$57.04");
- $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']", "");
- $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "label=1");
- $this->clickAndWait("link=Save", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']")->click();
+ $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "1");
+ $this->byLinkText("Save")->click();
// 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->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled');
- //$this->verifyElementPresent("//img[@src='images/star1.gif']",'');
+ $this->assertContains("Design Pattern: Elements of Reusable Object-Oriented Software", $this->source());
+ $this->assertContains("Addison Wesley Professional", $this->source());
+ $this->assertContains("$57.04", $this->source());
+ $this->assertAttribute("ctl0_body_DataGrid_ctl2_ctl4@checked", null);
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled');
+ //$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->byId("ctl0_body_DataGrid_ctl3_ctl7")->click();
+ $this->byLinkText("Cancel")->click();
+ $this->assertContains("Design Patterns Explained : A New Perspective on Object-Oriented Design", $this->source());
// 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->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
- $this->chooseCancelOnNextConfirmation();
- $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", "");
- $this->verifyConfirmation("Are you sure?");
- $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",'');
+ $this->byId("ctl0_body_DataGrid_ctl3_ctl9")->click();
+
+ $this->assertEquals("Are you sure?", $this->alertText());
+ $this->acceptAlert();
+
+ $this->pause(500);
+ $this->assertNotContains("Design Patterns Explained : A New Perspective on Object-Oriented Design", $this->source());
+
+ $this->assertContains("Extreme Programming Explained : Embrace Change", $this->source());
+ $this->byId("ctl0_body_DataGrid_ctl6_ctl9")->click();
+
+ $this->assertEquals("Are you sure?", $this->alertText());
+ $this->dismissAlert();
+
+ $this->assertContains("Extreme Programming Explained : Embrace Change", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
index 702b997e..f67f5634 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
@@ -1,28 +1,28 @@
<?php
-class QuickstartDataGrid4TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid4TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true&amp;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->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');
+ $this->assertContains("Design Patterns: Elements of Reusable Object-Oriented Software", $this->source());
+ $this->assertContains("Addison-Wesley Professional", $this->source());
+ $this->assertContains("$47.04", $this->source());
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');
// verify sorting
- $this->clickAndWait("link=Book Title", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Publisher", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Price", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl2_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=In-stock", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Rating", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl4_ctl5").hasAttribute("checked")'), 'false');
+ $this->byLinkText("Book Title")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null);
+ $this->byLinkText("Publisher")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked', null);
+ $this->byLinkText("Price")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked', null);
+ $this->byLinkText("In-stock")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null);
+ $this->byLinkText("Rating")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked', null);
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
index f854d44c..3df22ff8 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php
@@ -1,113 +1,113 @@
<?php
-class QuickstartDataGrid5TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid5TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
// verify column headers
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
+ $this->assertContains('id', $this->source());
+ $this->assertContains('name', $this->source());
+ $this->assertContains('quantity', $this->source());
+ $this->assertContains('price', $this->source());
+ $this->assertContains('imported', $this->source());
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertContains('ITN005', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
// verify paging
- $this->clickAndWait("link=2", "");
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN011','');
- $this->verifyTextNotPresent('ITN005','');
+ $this->byLinkText("2")->click();
+ $this->assertContains('ITN006', $this->source());
+ $this->assertContains('ITN007', $this->source());
+ $this->assertContains('ITN008', $this->source());
+ $this->assertContains('ITN009', $this->source());
+ $this->assertContains('ITN010', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
+ $this->assertNotContains('ITN005', $this->source());
- $this->clickAndWait("link=4", "");
- $this->verifyTextPresent('ITN016','');
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN015','');
+ $this->byLinkText("4")->click();
+ $this->assertContains('ITN016', $this->source());
+ $this->assertContains('ITN017', $this->source());
+ $this->assertContains('ITN018', $this->source());
+ $this->assertContains('ITN019', $this->source());
+ $this->assertNotContains('ITN015', $this->source());
- $this->clickAndWait("link=1", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
+ $this->byLinkText("1")->click();
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertContains('ITN005', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
// show top pager
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", "");
- $this->clickAndWait("id=ctl0_body_DataGrid_ctl8_ctl3", "");
- $this->clickAndWait("link=1", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']")->click();
+ $this->byId("ctl0_body_DataGrid_ctl8_ctl3")->click();
+ $this->byLinkText("1")->click();
// hide top pager
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']")->click();
// change next prev caption
$this->type("ctl0\$body\$NextPageText", "Next Page");
$this->type("ctl0\$body\$PrevPageText", "Prev Page");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
// verify next prev paging
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextNotPresent('ITN006','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN015','');
- $this->verifyTextPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextNotPresent('ITN006','');
+ $this->assertContains('ITN001', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
+ $this->byLinkText("Next Page")->click();
+ $this->assertNotContains('ITN005', $this->source());
+ $this->assertContains('ITN006', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
+ $this->byLinkText("Next Page")->click();
+ $this->assertNotContains('ITN010', $this->source());
+ $this->assertContains('ITN011', $this->source());
+ $this->assertNotContains('ITN016', $this->source());
+ $this->byLinkText("Next Page")->click();
+ $this->assertNotContains('ITN015', $this->source());
+ $this->assertContains('ITN016', $this->source());
+ $this->byLinkText("Prev Page")->click();
+ $this->assertNotContains('ITN010', $this->source());
+ $this->assertContains('ITN011', $this->source());
+ $this->assertNotContains('ITN016', $this->source());
+ $this->byLinkText("Prev Page")->click();
+ $this->assertNotContains('ITN005', $this->source());
+ $this->assertContains('ITN006', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
+ $this->byLinkText("Prev Page")->click();
+ $this->assertContains('ITN001', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
// change button count
$this->type("ctl0\$body\$PageButtonCount", "2");
- $this->clickAndWait("name=ctl0\$body\$ctl6", "");
- $this->clickAndWait("link=Next Page", "");
- $this->verifyTextNotPresent('ITN010','');
- $this->verifyTextPresent('ITN011','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("link=4", "");
- $this->verifyTextNotPresent('ITN015','');
- $this->verifyTextPresent('ITN016','');
- $this->clickAndWait("link=Prev Page", "");
- $this->verifyTextNotPresent('ITN005','');
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextNotPresent('ITN011','');
+ $this->byName("ctl0\$body\$ctl6")->click();
+ $this->byLinkText("Next Page")->click();
+ $this->assertNotContains('ITN010', $this->source());
+ $this->assertContains('ITN011', $this->source());
+ $this->assertNotContains('ITN016', $this->source());
+ $this->byLinkText("4")->click();
+ $this->assertNotContains('ITN015', $this->source());
+ $this->assertContains('ITN016', $this->source());
+ $this->byLinkText("Prev Page")->click();
+ $this->assertNotContains('ITN005', $this->source());
+ $this->assertContains('ITN006', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
$this->type("ctl0\$body\$PageButtonCount", "10");
- $this->clickAndWait("name=ctl0\$body\$ctl6", "");
+ $this->byName("ctl0\$body\$ctl6")->click();
$this->type("ctl0\$body\$PageSize", "2");
- $this->clickAndWait("name=ctl0\$body\$ctl8", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
- $this->clickAndWait("link=10", "");
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
+ $this->byName("ctl0\$body\$ctl8")->click();
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertNotContains('ITN003', $this->source());
+ $this->byLinkText("10")->click();
+ $this->assertContains('ITN019', $this->source());
+ $this->assertNotContains('ITN018', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php
index c6fba20f..54af86a8 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php
@@ -1,48 +1,48 @@
<?php
-class QuickstartDataGrid6TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid6TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&amp;notheme=true&amp;lang=en");
// verify column headers
- $this->verifyTextPresent('id','');
- $this->verifyTextPresent('name','');
- $this->verifyTextPresent('quantity','');
- $this->verifyTextPresent('price','');
- $this->verifyTextPresent('imported','');
+ $this->assertContains('id', $this->source());
+ $this->assertContains('name', $this->source());
+ $this->assertContains('quantity', $this->source());
+ $this->assertContains('price', $this->source());
+ $this->assertContains('imported', $this->source());
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertContains('ITN005', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
// verify paging
- $this->clickAndWait("link=2", "");
- $this->verifyTextPresent('ITN006','');
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN011','');
- $this->verifyTextNotPresent('ITN005','');
+ $this->byLinkText("2")->click();
+ $this->assertContains('ITN006', $this->source());
+ $this->assertContains('ITN007', $this->source());
+ $this->assertContains('ITN008', $this->source());
+ $this->assertContains('ITN009', $this->source());
+ $this->assertContains('ITN010', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
+ $this->assertNotContains('ITN005', $this->source());
- $this->clickAndWait("link=4", "");
- $this->verifyTextPresent('ITN016','');
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN015','');
+ $this->byLinkText("4")->click();
+ $this->assertContains('ITN016', $this->source());
+ $this->assertContains('ITN017', $this->source());
+ $this->assertContains('ITN018', $this->source());
+ $this->assertContains('ITN019', $this->source());
+ $this->assertNotContains('ITN015', $this->source());
- $this->clickAndWait("link=1", "");
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextPresent('ITN005','');
- $this->verifyTextNotPresent('ITN006','');
+ $this->byLinkText("1")->click();
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertContains('ITN005', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php
index 4ff6478a..436af2ad 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php
@@ -1,24 +1,24 @@
<?php
-class QuickstartDataList1TestCase extends PradoGenericSeleniumTest
+class QuickstartDataList1TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('$100','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextPresent('Surge protector','');
- $this->verifyTextPresent('45','');
- $this->verifyTextPresent('$15','');
- $this->verifyTextPresent('Total 19 products.','');
- $this->verifyTextPresent('Computer Parts','');
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('$100', $this->source());
+ $this->assertContains('Motherboard', $this->source());
+ $this->assertContains('ITN018', $this->source());
+ $this->assertContains('Surge protector', $this->source());
+ $this->assertContains('45', $this->source());
+ $this->assertContains('$15', $this->source());
+ $this->assertContains('Total 19 products.', $this->source());
+ $this->assertContains('Computer Parts', $this->source());
// verify specific table tags
- $this->verifyElementPresent("ctl0_body_DataList");
- $this->verifyElementPresent("//td[@align='right']");
+ $this->assertElementPresent("ctl0_body_DataList");
+ $this->assertElementPresent("//td[@align='right']");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php
index 4fb3743e..c21d71f3 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php
@@ -1,59 +1,65 @@
<?php
-class QuickstartDataList2TestCase extends PradoGenericSeleniumTest
+class QuickstartDataList2TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&amp;notheme=true&amp;lang=en");
// verify initial presentation
- $this->verifyTextPresent("Motherboard ", "");
- $this->verifyTextPresent("Monitor ", "");
+ $this->assertContains("Motherboard", $this->source());
+ $this->assertContains("Monitor", $this->source());
// verify selecting an item
- $this->clickAndWait("link=ITN003", "");
- $this->verifyTextPresent("Quantity", "");
- $this->verifyTextPresent("Price", "");
- $this->verifyTextPresent("\$80", "");
- $this->clickAndWait("link=ITN005", "");
- $this->verifyTextPresent("\$150", "");
+ $this->byLinkText("ITN003")->click();
+ $this->assertContains("Quantity", $this->source());
+ $this->assertContains("Price", $this->source());
+ $this->assertContains("\$80", $this->source());
+ $this->byLinkText("ITN005")->click();
+ $this->assertContains("\$150", $this->source());
// verify editting an item
- $this->clickAndWait("id=ctl0_body_DataList_ctl5_ctl0", "");
+ $this->byId("ctl0_body_DataList_ctl5_ctl0")->click();
$this->type("ctl0\$body\$DataList\$ctl5\$ProductQuantity", "11");
$this->type("ctl0\$body\$DataList\$ctl5\$ProductPrice", "140.99");
- $this->click("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']", "");
- $this->clickAndWait("link=Save", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']")->click();
+ $this->byLinkText("Save")->click();
// verify item is saved
- $this->clickAndWait("link=ITN005", "");
- $this->verifyTextPresent("\$140.99", "");
- $this->verifyTextPresent("11", "");
+ $this->byLinkText("ITN005")->click();
+ $this->assertContains("\$140.99", $this->source());
+ $this->assertContains("11", $this->source());
// verify editting another item
- $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", "");
+ $this->byId("ctl0_body_DataList_ctl3_ctl1")->click();
$this->type("ctl0\$body\$DataList\$ctl3\$ProductName", "Hard Drive");
$this->type("ctl0\$body\$DataList\$ctl3\$ProductQuantity", "23");
- $this->click("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']", "");
- $this->clickAndWait("link=Cancel", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']")->click();
+ $this->byLinkText("Cancel")->click();
// verify item is canceled
- $this->clickAndWait("link=ITN003", "");
- $this->verifyTextPresent("2", "");
- $this->verifyTextPresent("Harddrive ", "");
+ $this->byLinkText("ITN003")->click();
+ $this->assertContains("2", $this->source());
+ $this->assertContains("Harddrive", $this->source());
// verify item deletion
- $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", "");
- $this->verifyConfirmation("Are you sure?");
- $this->chooseCancelOnNextConfirmation();
- $this->click("id=ctl0_body_DataList_ctl5_ctl2", "");
- $this->verifyConfirmation("Are you sure?");
- $this->verifyTextPresent("Motherboard ", "");
- $this->verifyTextPresent("CPU ", "");
- $this->verifyTextNotPresent("Harddrive","");
- $this->verifyTextPresent("Sound card", "");
- $this->verifyTextPresent("Video card", "");
- $this->verifyTextPresent("Keyboard","");
- $this->verifyTextPresent("Monitor ", "");
+ $this->byId("ctl0_body_DataList_ctl3_ctl1")->click();
+
+ $this->assertEquals("Are you sure?", $this->alertText());
+ $this->acceptAlert();
+
+ $this->pause(300); // wait for reload
+ $this->byId("ctl0_body_DataList_ctl5_ctl2")->click();
+
+ $this->assertEquals("Are you sure?", $this->alertText());
+ $this->dismissAlert();
+
+ $this->assertContains("Motherboard", $this->source());
+ $this->assertContains("CPU", $this->source());
+ $this->assertNotContains("Harddrive", $this->source());
+ $this->assertContains("Sound card", $this->source());
+ $this->assertContains("Video card", $this->source());
+ $this->assertContains("Keyboard", $this->source());
+ $this->assertContains("Monitor", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
index eae8ab36..cb01e948 100755
--- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php
@@ -1,65 +1,65 @@
<?php
-class QuickstartDropDownListTestCase extends PradoGenericSeleniumTest
+class QuickstartDropDownListTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// dropdown list with default settings
- $this->verifyElementPresent("ctl0\$body\$ctl0");
+ $this->assertElementPresent("ctl0\$body\$ctl0");
// dropdown list with initial options
- $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4'));
$this->assertSelected("ctl0\$body\$ctl1","item 2");
// dropdown list with customized styles
- $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4'));
$this->assertSelected("ctl0\$body\$ctl2","item 2");
// a disabled dropdown list
- $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
// an auto postback dropdown list
- $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
- $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
+ $this->assertNotContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
+ $this->selectAndWait("ctl0\$body\$ctl4", "item 3");
+ $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
// a single selection list box upon postback
- $this->select("ctl0\$body\$DropDownList1", "label=item 4");
- $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
+ $this->select("ctl0\$body\$DropDownList1", "item 4");
+ $this->assertNotContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
// Databind to an integer-indexed array
- $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList1", "item 3");
+ $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source());
// Databind to an associative array
- $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList2", "item 2");
+ $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
// Databind with DataTextField and DataValueField specified
- $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
+ $this->selectAndWait("ctl0\$body\$DBDropDownList3", "Cary");
+ $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
// dropdown list is being validated
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("id=ctl0_body_ctl7", "");
- $this->verifyVisible('ctl0_body_ctl6');
- $this->select("ctl0\$body\$VDropDownList1", "label=item 2");
- $this->clickAndWait("id=ctl0_body_ctl7", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
+ $this->assertNotVisible('ctl0_body_ctl6');
+ $this->byId("ctl0_body_ctl7")->click();
+ $this->assertVisible('ctl0_body_ctl6');
+ $this->select("ctl0\$body\$VDropDownList1", "item 2");
+ $this->byId("ctl0_body_ctl7")->click();
+ $this->assertNotVisible('ctl0_body_ctl6');
// dropdown list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->select("ctl0\$body\$VDropDownList2", "label=Disagree");
+ $this->assertNotVisible('ctl0_body_ctl8');
+ $this->select("ctl0\$body\$VDropDownList2", "Disagree");
$this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
+ $this->assertVisible('ctl0_body_ctl8');
$this->type("ctl0\$body\$TextBox", "test");
- $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree");
- $this->verifyNotVisible('ctl0_body_ctl8');
+ $this->selectAndWait("ctl0\$body\$VDropDownList2", "Agree");
+ $this->assertNotVisible('ctl0_body_ctl8');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php
index 4d47fecd..8c5add48 100755
--- a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php
@@ -1,13 +1,13 @@
<?php
-class QuickstartExpressionTestCase extends PradoGenericSeleniumTest
+class QuickstartExpressionTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- $this->verifyTextPresent('PRADO QuickStart Sample');
+ $this->assertContains('PRADO QuickStart Sample', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php
index caa7a893..53ee6697 100755
--- a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php
@@ -1,12 +1,12 @@
<?php
-class QuickstartHtmlAreaTestCase extends PradoGenericSeleniumTest
+class QuickstartHtmlAreaTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// can't perform any test
}
diff --git a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php
index dc0261e7..bc7ef8b8 100755
--- a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php
@@ -1,15 +1,15 @@
<?php
-class QuickstartHyperLinkTestCase extends PradoGenericSeleniumTest
+class QuickstartHyperLinkTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&amp;notheme=true&amp;lang=en", "");
- $this->verifyTitle("PRADO QuickStart Sample", "");
- $this->verifyElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]");
- $this->verifyTextPresent("Welcome to", "");
- $this->verifyTextPresent("Body contents", "");
- $this->verifyElementPresent("//a[img/@alt='Hello World']");
- $this->verifyElementPresent("//a[contains(text(),'Body contents')]");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&amp;notheme=true&amp;lang=en");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
+ $this->assertElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]");
+ $this->assertContains("Welcome to", $this->source());
+ $this->assertContains("Body contents", $this->source());
+ $this->assertElementPresent("//a[img/@alt='Hello World']");
+ $this->assertElementPresent("//a[contains(text(),'Body contents')]");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php
index bf531d72..0f86216e 100755
--- a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php
@@ -1,28 +1,28 @@
<?php
-class QuickstartImageButtonTestCase extends PradoGenericSeleniumTest
+class QuickstartImageButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// a click button
- $this->clickAndWait("//input[@type='image' and @alt='hello world']", "");
- $this->verifyTextPresent("You clicked at ","");
+ $this->byXPath("//input[@type='image' and @alt='hello world']")->click();
+ $this->assertContains("You clicked at ", $this->source());
// a command button
- $this->clickAndWait("ctl0\$body\$ctl1", "");
- $this->verifyTextPresent("Command name: test, Command parameter: value","");
+ $this->byName("ctl0\$body\$ctl1")->click();
+ $this->assertContains("Command name: test, Command parameter: value", $this->source());
// a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl2');
- $this->click("id=ctl0_body_ctl3", "");
+ $this->assertNotVisible('ctl0_body_ctl2');
+ $this->byId("ctl0_body_ctl3")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl2');
+ $this->assertVisible('ctl0_body_ctl2');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("id=ctl0_body_ctl3", "");
- $this->verifyNotVisible('ctl0_body_ctl2');
+ $this->byId("ctl0_body_ctl3")->click();
+ $this->assertNotVisible('ctl0_body_ctl2');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php
index 19e80470..f3bd4775 100755
--- a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php
@@ -1,18 +1,18 @@
<?php
//New Test
-class QuickstartImageTestCase extends PradoGenericSeleniumTest
+class QuickstartImageTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']");
- $this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']");
- $this->verifyTextPresent("Hello World! Hello World! Hello World!", "");
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']");
- //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]");
+ //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']");
+ $this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']");
+ $this->assertContains("Hello World! Hello World! Hello World!", $this->source());
+ //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']");
+ //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php
index 03bba8ed..a9aa0bbe 100755
--- a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php
@@ -1,20 +1,20 @@
<?php
//New Test
-class QuickstartLabelTestCase extends PradoGenericSeleniumTest
+class QuickstartLabelTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&amp;notheme=true&amp;lang=en", "");
- $this->verifyTitle("PRADO QuickStart Sample", "");
- $this->verifyTextPresent("This is a label with customized color and font.", "");
- $this->verifyTextPresent("This is a form label associated with the TTextBox control below", "");
- $this->verifyTextPresent("This is a label with empty Text property and nonempty body", "");
- $this->verifyTextPresent("This is a disabled label", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&amp;notheme=true&amp;lang=en");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
+ $this->assertContains("This is a label with customized color and font.", $this->source());
+ $this->assertContains("This is a form label associated with the TTextBox control below", $this->source());
+ $this->assertContains("This is a label with empty Text property and <b>nonempty body</b>", $this->source());
+ $this->assertContains("This is a disabled label", $this->source());
- $this->verifyAttribute("ctl0_body_Label2@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0_body_Label2@disabled","regexp:true|disabled");
- //$this->verifyAttribute("ctl0_body_Label1@for","ctl0_body_test");
+ //$this->assertAttribute("ctl0_body_Label1@for","ctl0_body_test");
$this->type("ctl0\$body\$test", "test");
}
diff --git a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php
index 57e7b975..97b4863d 100755
--- a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php
@@ -1,32 +1,32 @@
<?php
-class QuickstartLinkButtonTestCase extends PradoGenericSeleniumTest
+class QuickstartLinkButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// regular buttons
- $this->clickAndWait("link=link button", "");
- $this->clickAndWait("//a[contains(text(),'body content')]", "");
+ $this->byLinkText("link button")->click();
+ $this->byXPath("//a[contains(text(),'body content')]")->click();
// a click button
- $this->clickAndWait("link=click me", "");
- $this->clickAndWait("link=I'm clicked", "");
+ $this->byLinkText("click me")->click();
+ $this->byLinkText("I'm clicked")->click();
// a command button
- $this->clickAndWait("link=click me", "");
- $this->clickAndWait("//a[contains(text(),'Name: test, Param: value')]", "");
+ $this->byLinkText("click me")->click();
+ $this->byXPath("//a[contains(text(),'Name: test, Param: value')]")->click();
// a button causing validation
- $this->verifyNotVisible('ctl0_body_ctl4');
- $this->click("link=submit", "");
+ $this->assertNotVisible('ctl0_body_ctl4');
+ $this->byLinkText("submit")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl4');
+ $this->assertVisible('ctl0_body_ctl4');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("link=submit", "");
- $this->verifyNotVisible('ctl0_body_ctl4');
+ $this->byLinkText("submit")->click();
+ $this->assertNotVisible('ctl0_body_ctl4');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
index 1cae0d43..11910ba5 100755
--- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php
@@ -1,82 +1,81 @@
<?php
//New Test
-class QuickstartListBoxTestCase extends PradoGenericSeleniumTest
+class QuickstartListBoxTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&amp;notheme=true&amp;lang=en");
// a default single selection listbox
- $this->verifyAttribute("ctl0\$body\$ctl0@size","4");
+ $this->assertAttribute("ctl0\$body\$ctl0@size","4");
// single selection list box with initial options
- $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4'));
+ $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4'));
$this->assertSelected("ctl0\$body\$ctl1","item 2");
// a single selection list box with customized style
- $this->verifyAttribute("ctl0\$body\$ctl2@size","3");
- $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4'));
+ $this->assertAttribute("ctl0\$body\$ctl2@size","3");
+ $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4'));
$this->assertSelected("ctl0\$body\$ctl2","item 2");
// a disabled list box
- $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled");
// an auto postback single selection list box
- $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
- $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3");
- $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
+ $this->assertNotContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
+ $this->selectAndWait("ctl0\$body\$ctl4", "item 3");
+ $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
// a single selection list box upon postback
- $this->select("ctl0\$body\$ListBox1", "label=item 4");
- $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("exact:Your selection is: (Index: 3, Value: value 4, Text: item 4)", "");
+ $this->select("ctl0\$body\$ListBox1", "item 4");
+ $this->assertNotContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source());
// a multiple selection list box
- $this->verifyAttribute("ctl0\$body\$ctl6[]@size","4");
- $this->verifyAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple");
+ $this->assertAttribute("ctl0\$body\$ctl6[]@size","4");
+ $this->assertAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple");
// a multiple selection list box with initial options
- $this->verifyAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple");
+ $this->assertAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple");
$this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl7[]"), array('item 1', 'item 2', 'item 3', 'item 4'));
// multiselection list box's behavior upon postback
- $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3");
- $this->clickAndWait("name=ctl0\$body\$ctl8", "");
- $this->verifyText("ctl0_body_MultiSelectionResult2","exact:Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)");
+ $this->addSelection("ctl0\$body\$ListBox2[]", "item 3");
+ $this->byName("ctl0\$body\$ctl8")->click();
+ $this->assertText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)");
// Auto postback multiselection list box
- $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1");
- $this->waitForPageToLoad(1000);
- $this->verifyText("ctl0_body_MultiSelectionResult","exact:Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)");
+ $this->addSelection("ctl0\$body\$ctl9[]", "item 1");
+ $this->assertText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)");
// Databind to an integer-indexed array
- $this->selectAndWait("ctl0\$body\$DBListBox1[]", "label=item 3");
- $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 2, Text: item 3)", "");
+ $this->selectAndWait("ctl0\$body\$DBListBox1[]", "item 3");
+ $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source());
// Databind to an associative array
- $this->selectAndWait("ctl0\$body\$DBListBox2[]", "label=item 2");
- $this->verifyTextPresent("exact:Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
+ $this->selectAndWait("ctl0\$body\$DBListBox2[]", "item 2");
+ $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
// Databind with DataTextField and DataValueField specified
- $this->selectAndWait("ctl0\$body\$DBListBox3[]", "label=Cary");
- $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
+ $this->selectAndWait("ctl0\$body\$DBListBox3[]", "Cary");
+ $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
// List box is being validated
- $this->verifyNotVisible('ctl0_body_ctl10');
- $this->click("id=ctl0_body_ctl11", "");
- $this->verifyVisible('ctl0_body_ctl10');
- $this->select("ctl0\$body\$VListBox1", "label=item 2");
- $this->clickAndWait("id=ctl0_body_ctl11", "");
- $this->verifyNotVisible('ctl0_body_ctl10');
+ $this->assertNotVisible('ctl0_body_ctl10');
+ $this->byId("ctl0_body_ctl11")->click();
+ $this->assertVisible('ctl0_body_ctl10');
+ $this->select("ctl0\$body\$VListBox1", "item 2");
+ $this->byId("ctl0_body_ctl11")->click();
+ $this->assertNotVisible('ctl0_body_ctl10');
// List box causing validation
- $this->verifyNotVisible('ctl0_body_ctl12');
- $this->select("ctl0\$body\$VListBox2", "label=Agree");
- $this->verifyVisible('ctl0_body_ctl12');
+ $this->assertNotVisible('ctl0_body_ctl12');
+ $this->select("ctl0\$body\$VListBox2", "Agree");
+ $this->assertVisible('ctl0_body_ctl12');
$this->type("ctl0\$body\$TextBox", "test");
- $this->selectAndWait("ctl0\$body\$VListBox2", "label=Disagree");
- $this->verifyNotVisible('ctl0_body_ctl12');
+ $this->selectAndWait("ctl0\$body\$VListBox2", "Disagree");
+ $this->assertNotVisible('ctl0_body_ctl12');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
index 2b47456e..d7a5ebec 100755
--- a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php
@@ -1,35 +1,35 @@
<?php
-class QuickstartMultiViewTestCase extends PradoGenericSeleniumTest
+class QuickstartMultiViewTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// view 1 : type in a string
- $this->verifyElementNotPresent('ctl0_body_Result1');
- $this->verifyElementNotPresent('ctl0_body_Result2');
+ $this->assertElementNotPresent('ctl0_body_Result1');
+ $this->assertElementNotPresent('ctl0_body_Result2');
$this->type('ctl0_body_Memo','test');
- $this->clickAndWait('ctl0$body$ctl0'); // view 2 to select the dropdown
- $this->clickAndWait('ctl0$body$ctl4');
+ $this->byName('ctl0$body$ctl0')->click(); // view 2 to select the dropdown
+ $this->byName('ctl0$body$ctl4')->click();
// view 3 : check if the output is updated
- $this->verifyTextPresent('Your text input is: test');
- $this->verifyTextPresent('Your color choice is: Red');
- $this->clickAndWait('ctl0$body$ctl7');
+ $this->assertContains('Your text input is: test', $this->source());
+ $this->assertContains('Your color choice is: Red', $this->source());
+ $this->byName('ctl0$body$ctl7')->click();
// view 2 : update dropdownlist
- $this->verifyElementNotPresent('ctl0_body_Result1');
- $this->verifyElementNotPresent('ctl0_body_Result2');
- $this->select('ctl0$body$DropDownList', "label=Blue");
- $this->clickAndWait('ctl0$body$ctl4');
+ $this->assertElementNotPresent('ctl0_body_Result1');
+ $this->assertElementNotPresent('ctl0_body_Result2');
+ $this->select('ctl0$body$DropDownList', "Blue");
+ $this->byName('ctl0$body$ctl4')->click();
// view 3 : check if the output is updated
- $this->verifyTextPresent('Your text input is: test');
- $this->verifyTextPresent('Your color choice is: Blue');
- $this->clickAndWait('ctl0$body$ctl7');
+ $this->assertContains('Your text input is: test', $this->source());
+ $this->assertContains('Your color choice is: Blue', $this->source());
+ $this->byName('ctl0$body$ctl7')->click();
// view 2 : check if dropdownlist maintains state
$this->assertSelected('ctl0$body$DropDownList', "Blue");
diff --git a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
index a1fefed6..7e4a6627 100755
--- a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php
@@ -1,56 +1,56 @@
<?php
-class QuickstartPagerTestCase extends PradoGenericSeleniumTest
+class QuickstartPagerTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&amp;notheme=true&amp;lang=en");
// verify datalist content
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertNotContains('ITN003', $this->source());
// verify numeric paging
- $this->clickAndWait("ctl0_body_Pager_ctl1", ""); // 2nd page
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextNotPresent('ITN002','');
- $this->verifyTextNotPresent('ITN005','');
- $this->clickAndWait("ctl0_body_Pager_ctl3", ""); // 4rd page
- $this->verifyTextPresent('ITN007','');
- $this->verifyTextPresent('ITN008','');
- $this->verifyTextNotPresent('ITN006','');
- $this->verifyTextNotPresent('ITN009','');
- $this->clickAndWait("ctl0_body_Pager_ctl6", ""); // last page
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
- $this->verifyTextNotPresent('ITN001','');
+ $this->byId("ctl0_body_Pager_ctl1")->click(); // 2nd page
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertNotContains('ITN002', $this->source());
+ $this->assertNotContains('ITN005', $this->source());
+ $this->byId("ctl0_body_Pager_ctl3")->click(); // 4rd page
+ $this->assertContains('ITN007', $this->source());
+ $this->assertContains('ITN008', $this->source());
+ $this->assertNotContains('ITN006', $this->source());
+ $this->assertNotContains('ITN009', $this->source());
+ $this->byId("ctl0_body_Pager_ctl6")->click(); // last page
+ $this->assertContains('ITN019', $this->source());
+ $this->assertNotContains('ITN018', $this->source());
+ $this->assertNotContains('ITN001', $this->source());
// verify next-prev paging
- $this->clickAndWait("ctl0_body_Pager2_ctl1", ""); // prev page
- $this->verifyTextPresent('ITN017','');
- $this->verifyTextPresent('ITN018','');
- $this->verifyTextNotPresent('ITN019','');
- $this->verifyTextNotPresent('ITN016','');
- $this->clickAndWait("ctl0_body_Pager2_ctl0", ""); // first page
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('ITN002','');
- $this->verifyTextNotPresent('ITN003','');
- $this->clickAndWait("ctl0_body_Pager2_ctl2", ""); // next page
- $this->verifyTextPresent('ITN003','');
- $this->verifyTextPresent('ITN004','');
- $this->verifyTextNotPresent('ITN002','');
- $this->verifyTextNotPresent('ITN005','');
+ $this->byId("ctl0_body_Pager2_ctl1")->click(); // prev page
+ $this->assertContains('ITN017', $this->source());
+ $this->assertContains('ITN018', $this->source());
+ $this->assertNotContains('ITN019', $this->source());
+ $this->assertNotContains('ITN016', $this->source());
+ $this->byId("ctl0_body_Pager2_ctl0")->click(); // first page
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('ITN002', $this->source());
+ $this->assertNotContains('ITN003', $this->source());
+ $this->byId("ctl0_body_Pager2_ctl2")->click(); // next page
+ $this->assertContains('ITN003', $this->source());
+ $this->assertContains('ITN004', $this->source());
+ $this->assertNotContains('ITN002', $this->source());
+ $this->assertNotContains('ITN005', $this->source());
$this->assertSelected("ctl0_body_Pager3_ctl0","2");
- $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=5");
- $this->verifyTextPresent('ITN009','');
- $this->verifyTextPresent('ITN010','');
- $this->verifyTextNotPresent('ITN008','');
- $this->verifyTextNotPresent('ITN011','');
- $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=10");
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextNotPresent('ITN018','');
+ $this->selectAndWait("ctl0_body_Pager3_ctl0", "5");
+ $this->assertContains('ITN009', $this->source());
+ $this->assertContains('ITN010', $this->source());
+ $this->assertNotContains('ITN008', $this->source());
+ $this->assertNotContains('ITN011', $this->source());
+ $this->selectAndWait("ctl0_body_Pager3_ctl0", "10");
+ $this->assertContains('ITN019', $this->source());
+ $this->assertNotContains('ITN018', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php
index 3def308b..0d3e2797 100755
--- a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php
@@ -1,16 +1,16 @@
<?php
-class QuickstartPanelTestCase extends PradoGenericSeleniumTest
+class QuickstartPanelTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&amp;notheme=true&amp;lang=en", "");
- $this->verifyTextPresent("This is panel content with", "");
- $this->verifyElementPresent("//span[text()='label']");
- $this->verifyTextPresent("grouping text", "");
- $this->click("//input[@name='ctl0\$body\$ctl17']", "");
- $this->verifyTextNotPresent("You have clicked on 'button2'.");
- $this->clickAndWait("//input[@type='submit' and @value='button2']", "");
- $this->verifyTextPresent("You have clicked on 'button2'.");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&amp;notheme=true&amp;lang=en");
+ $this->assertContains("This is panel content with", $this->source());
+ $this->assertElementPresent("//span[text()='label']");
+ $this->assertContains("grouping text", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl17']")->click();
+ $this->assertNotContains("You have clicked on 'button2'.", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='button2']")->click();
+ $this->assertContains("You have clicked on 'button2'.", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php
index 659f20ff..6242cebe 100755
--- a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php
@@ -1,17 +1,17 @@
<?php
//New Test
-class QuickstartRadioButtonListTestCase extends PradoGenericSeleniumTest
+class QuickstartRadioButtonListTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&amp;notheme=true&amp;lang=en");
// RadioButton list with default settings:
- $this->click("//input[@name='ctl0\$body\$ctl0' and @value='value 3']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0' and @value='value 3']")->click();
// RadioButton list with customized cellpadding, cellspacing, color and text alignment:
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value 1']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value 1']")->click();
// *** Currently unable to test the following cases:
// RadioButton list with vertical (default) repeat direction
@@ -20,33 +20,33 @@ class QuickstartRadioButtonListTestCase extends PradoGenericSeleniumTest
// RadioButton list with flow layout and horizontal repeat direction:
// RadioButton list's behavior upon postback
- $this->click("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source());
// Auto postback check box list
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl7' and @value='value 5']", "");
- $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl7' and @value='value 5']")->click();
+ $this->assertContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)", $this->source());
// Databind to an integer-indexed array
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']", "");
- $this->verifyTextPresent("Your selection is: (Index: 0, Value: 0, Text: item 1)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']")->click();
+ $this->assertContains("Your selection is: (Index: 0, Value: 0, Text: item 1)", $this->source());
// Databind to an associative array:
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']", "");
- $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']")->click();
+ $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source());
// Databind with DataTextField and DataValueField specified
- $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']", "");
- $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", "");
+ $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']")->click();
+ $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source());
// RadioButton list causing validation
- $this->verifyNotVisible('ctl0_body_ctl8');
- $this->click("//input[@name='ctl0\$body\$ctl9' and @value='Agree']", "");
+ $this->assertNotVisible('ctl0_body_ctl8');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl9' and @value='Agree']")->click();
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl8');
+ $this->assertVisible('ctl0_body_ctl8');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']", "");
- $this->verifyNotVisible('ctl0_body_ctl8');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']")->click();
+ $this->assertNotVisible('ctl0_body_ctl8');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php
index 22031235..214b1596 100755
--- a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php
@@ -1,56 +1,56 @@
<?php
-class QuickstartRadioButtonTestCase extends PradoGenericSeleniumTest
+class QuickstartRadioButtonTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// a regular radiobutton
- $this->click("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']")->click();
// a radiobutton with customized value
- $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", "");
+ $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value']")->click();
// an auto postback radiobutton
- $this->verifyTextNotPresent("I'm clicked");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
- $this->click("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", "");
- $this->verifyTextPresent("I'm clicked");
+ $this->assertNotContains("I'm clicked", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click();
+ $this->assertContains("I'm clicked", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click();
+ $this->assertContains("I'm clicked", $this->source());
// a radiobutton causing validation on a textbox
- $this->verifyNotVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
+ $this->assertNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click();
$this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
- $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
+ $this->assertVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click();
$this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl3');
+ $this->assertVisible('ctl0_body_ctl3');
$this->type("ctl0\$body\$TextBox", "test");
- $this->clickAndWait("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", "");
- $this->verifyNotVisible('ctl0_body_ctl3');
+ $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click();
+ $this->assertNotVisible('ctl0_body_ctl3');
// a radiobutton validated by a required field validator
- $this->verifyNotVisible('ctl0_body_ctl6');
- $this->click("//input[@type='submit' and @value='Submit']", "");
+ $this->assertNotVisible('ctl0_body_ctl6');
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
$this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl6');
- $this->click("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_ctl6');
+ $this->assertVisible('ctl0_body_ctl6');
+ $this->byXPath("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertNotVisible('ctl0_body_ctl6');
// a radiobutton group
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is empty");
- $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']", "");
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is 2");
- $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']", "");
- $this->click("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']", "");
- $this->clickAndWait("name=ctl0\$body\$ctl7", "");
- $this->verifyTextPresent("Your selection is 34");
+ $this->byName("ctl0\$body\$ctl7")->click();
+ $this->assertContains("Your selection is empty", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']")->click();
+ $this->byName("ctl0\$body\$ctl7")->click();
+ $this->assertContains("Your selection is 2", $this->source());
+ $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']")->click();
+ $this->byXPath("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']")->click();
+ $this->byName("ctl0\$body\$ctl7")->click();
+ $this->assertContains("Your selection is 34", $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php
index 948055e1..4d7db9b3 100755
--- a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php
@@ -1,27 +1,27 @@
<?php
-class QuickstartRepeater1TestCase extends PradoGenericSeleniumTest
+class QuickstartRepeater1TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('ID','');
- $this->verifyTextPresent('Name','');
- $this->verifyTextPresent('Quantity','');
- $this->verifyTextPresent('Price','');
- $this->verifyTextPresent('Imported','');
- $this->verifyTextPresent('ITN001','');
- $this->verifyTextPresent('Motherboard','');
- $this->verifyTextPresent('Yes','');
- $this->verifyTextPresent('ITN019','');
- $this->verifyTextPresent('Speaker','');
- $this->verifyTextPresent('No','');
- $this->verifyTextPresent('Computer Parts Inventory','');
+ $this->assertContains('ID', $this->source());
+ $this->assertContains('Name', $this->source());
+ $this->assertContains('Quantity', $this->source());
+ $this->assertContains('Price', $this->source());
+ $this->assertContains('Imported', $this->source());
+ $this->assertContains('ITN001', $this->source());
+ $this->assertContains('Motherboard', $this->source());
+ $this->assertContains('Yes', $this->source());
+ $this->assertContains('ITN019', $this->source());
+ $this->assertContains('Speaker', $this->source());
+ $this->assertContains('No', $this->source());
+ $this->assertContains('Computer Parts Inventory', $this->source());
// verify specific table tags
- $this->verifyElementPresent("//td[@colspan='5']");
- $this->verifyElementPresent("//table[@cellpadding='2']");
+ $this->assertElementPresent("//td[@colspan='5']");
+ $this->assertElementPresent("//table[@cellpadding='2']");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php
index 7d989fd0..8eb8c863 100755
--- a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php
@@ -1,35 +1,35 @@
<?php
-class QuickstartRepeater2TestCase extends PradoGenericSeleniumTest
+class QuickstartRepeater2TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('North','');
- $this->verifyTextPresent('John','');
- $this->verifyTextPresent('Developer','');
- $this->verifyTextPresent('South','');
- $this->verifyTextPresent('Carter','');
- $this->verifyTextPresent('Program Manager','');
+ $this->assertContains('North', $this->source());
+ $this->assertContains('John', $this->source());
+ $this->assertContains('Developer', $this->source());
+ $this->assertContains('South', $this->source());
+ $this->assertContains('Carter', $this->source());
+ $this->assertContains('Program Manager', $this->source());
// verify specific table tags
- $this->verifyElementPresent("//table[@cellspacing='1']");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']","");
- $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']","");
- $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']","");
+ $this->assertElementPresent("//table[@cellspacing='1']");
+ $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]","");
+ $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']","");
+ $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']","");
+ $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']","");
+ $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']","");
+ $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']","");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php
index a5031af5..3572a36f 100755
--- a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php
@@ -1,35 +1,35 @@
<?php
-class QuickstartRepeater3TestCase extends PradoGenericSeleniumTest
+class QuickstartRepeater3TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&amp;notheme=true&amp;lang=en");
// verify product name is required
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
+ $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl0');
$this->type("ctl0_body_Repeater_ctl0_ProductName", "");
- $this->click("//input[@type='submit' and @value='Save']", "");
- $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl0');
+ $this->byXPath("//input[@type='submit' and @value='Save']")->click();
+ $this->assertVisible('ctl0_body_Repeater_ctl0_ctl0');
// verify product price is of proper format
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
+ $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl1');
$this->type("ctl0_body_Repeater_ctl0_ProductPrice", "abc");
- $this->click("//input[@type='submit' and @value='Save']", "");
- $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl1');
+ $this->byXPath("//input[@type='submit' and @value='Save']")->click();
+ $this->assertVisible('ctl0_body_Repeater_ctl0_ctl1');
// perform postback
- $this->click("ctl0_body_Repeater_ctl0_ProductImported",'');
+ $this->byId("ctl0_body_Repeater_ctl0_ProductImported",'')->click();
$this->type("ctl0_body_Repeater_ctl0_ProductName", "Mother Board");
$this->type("ctl0_body_Repeater_ctl0_ProductPrice", "99.01");
- $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "label=Accessories");
- $this->clickAndWait("//input[@type='submit' and @value='Save']", "");
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0');
- $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1');
+ $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "Accessories");
+ $this->byXPath("//input[@type='submit' and @value='Save']")->click();
+ $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl0');
+ $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl1');
// verify postback results
- $this->verifyElementPresent("//td[text()='Mother Board']",'');
- $this->verifyElementNotPresent("//td[text()='Input Devices']",'');
- $this->verifyElementPresent("//td[text()='99.01']",'');
+ $this->assertElementPresent("//td[text()='Mother Board']",'');
+ $this->assertElementNotPresent("//td[text()='Input Devices']",'');
+ $this->assertElementPresent("//td[text()='99.01']",'');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php
index a7c4c579..df0e6f89 100755
--- a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php
@@ -1,13 +1,13 @@
<?php
-class QuickstartStatementsTestCase extends PradoGenericSeleniumTest
+class QuickstartStatementsTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
- $this->verifyTextPresent('UniqueID is \'ctl0$body$ctl0\'');
+ $this->assertContains('UniqueID is \'ctl0$body$ctl0\'', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php
index d01e824d..13392ca5 100755
--- a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php
@@ -1,47 +1,47 @@
<?php
-class QuickstartTabPanelTestCase extends PradoGenericSeleniumTest
+class QuickstartTabPanelTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// verify initial visibility
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
+ $this->assertNotVisible('ctl0_body_View1'); // view 1
+ $this->assertVisible('ctl0_body_View2'); // view 2
+ $this->assertNotVisible('ctl0_body_ctl2'); // view 3
// switching to the first view
- $this->click('ctl0_body_View1_0');
+ $this->byId('ctl0_body_View1_0')->click();
$this->pause(500);
- $this->verifyVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
- $this->verifyNotVisible('ctl0_body_View11'); // view 11
- $this->verifyVisible('ctl0_body_View21'); // view 21
+ $this->assertVisible('ctl0_body_View1'); // view 1
+ $this->assertNotVisible('ctl0_body_View2'); // view 2
+ $this->assertNotVisible('ctl0_body_ctl2'); // view 3
+ $this->assertNotVisible('ctl0_body_View11'); // view 11
+ $this->assertVisible('ctl0_body_View21'); // view 21
// switching to View11
- $this->click('ctl0_body_View11_0');
+ $this->byId('ctl0_body_View11_0')->click();
$this->pause(500);
- $this->verifyVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyNotVisible('ctl0_body_ctl2'); // view 3
- $this->verifyVisible('ctl0_body_View11'); // view 11
- $this->verifyNotVisible('ctl0_body_View21'); // view 21
+ $this->assertVisible('ctl0_body_View1'); // view 1
+ $this->assertNotVisible('ctl0_body_View2'); // view 2
+ $this->assertNotVisible('ctl0_body_ctl2'); // view 3
+ $this->assertVisible('ctl0_body_View11'); // view 11
+ $this->assertNotVisible('ctl0_body_View21'); // view 21
// switching to the third view
- $this->click('ctl0_body_ctl2_0');
+ $this->byId('ctl0_body_ctl2_0')->click();
$this->pause(500);
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyVisible('ctl0_body_ctl2'); // view 3
+ $this->assertNotVisible('ctl0_body_View1'); // view 1
+ $this->assertNotVisible('ctl0_body_View2'); // view 2
+ $this->assertVisible('ctl0_body_ctl2'); // view 3
// submit: check if the visibility is kept
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyNotVisible('ctl0_body_View1'); // view 1
- $this->verifyNotVisible('ctl0_body_View2'); // view 2
- $this->verifyVisible('ctl0_body_ctl2'); // view 3
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertNotVisible('ctl0_body_View1'); // view 1
+ $this->assertNotVisible('ctl0_body_View2'); // view 2
+ $this->assertVisible('ctl0_body_ctl2'); // view 3
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php
index 128f4b22..aafd6f80 100755
--- a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php
@@ -1,18 +1,18 @@
<?php
-class QuickstartTableTestCase extends PradoGenericSeleniumTest
+class QuickstartTableTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&amp;notheme=true&amp;lang=en");
- $this->verifyElementPresent("//table[@rules='all' and @border='1']");
- $this->verifyElementPresent("//table/caption[@align='bottom' and text()='This is table caption']");
- $this->verifyElementPresent("//th[text()='header cell 2']");
- $this->verifyElementPresent("//tr[@align='right']/td[text()='text']");
- $this->verifyElementPresent("//td[@align='center' and contains(text(),'cell 5')]");
+ $this->assertElementPresent("//table[@rules='all' and @border='1']");
+ $this->assertElementPresent("//table/caption[@align='bottom' and text()='This is table caption']");
+ $this->assertElementPresent("//th[text()='header cell 2']");
+ $this->assertElementPresent("//tr[@align='right']/td[text()='text']");
+ $this->assertElementPresent("//td[@align='center' and contains(text(),'cell 5')]");
- $this->verifyElementPresent("//th[text()='Header 1']");
- $this->verifyElementPresent("//td[text()='Cell 1']");
+ $this->assertElementPresent("//th[text()='Header 1']");
+ $this->assertElementPresent("//td[text()='Cell 1']");
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
index a3464702..3865e33d 100755
--- a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php
@@ -1,58 +1,58 @@
<?php
-class QuickstartTextBoxTestCase extends PradoGenericSeleniumTest
+class QuickstartTextBoxTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// a normal textbox
$this->type("ctl0\$body\$ctl0", "test");
// textbox with maxlength set
- $this->verifyAttribute("ctl0\$body\$ctl1@size","4");
- $this->verifyAttribute("ctl0\$body\$ctl1@maxlength","6");
+ $this->assertAttribute("ctl0\$body\$ctl1@size","4");
+ $this->assertAttribute("ctl0\$body\$ctl1@maxlength","6");
$this->type("ctl0\$body\$ctl1", "textte");
// vCard textboxes
- $this->verifyAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName");
+ $this->assertAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName");
$this->type("ctl0\$body\$ctl2", "first");
- $this->verifyAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName");
+ $this->assertAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName");
$this->type("ctl0\$body\$ctl3", "last");
// a disabled textbox
- $this->verifyAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled");
// a read-only textbox
- $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly");
+ $this->assertAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly");
// auto postback textbox, CausesValidation=false
- $this->verifyValue("ctl0\$body\$ctl6", "change me");
- $this->typeAndWait("ctl0\$body\$ctl6", "change mes");
- $this->verifyValue("ctl0\$body\$ctl6", "text changed");
+ $this->assertValue("ctl0\$body\$ctl6", "change me");
+ $this->typeSpecial("ctl0\$body\$ctl6", "change mes");
+ $this->assertValue("ctl0\$body\$ctl6", "text changed");
// auto postback textbox, CausesValidation=true
- $this->verifyNotVisible('ctl0_body_ctl7');
- $this->type("ctl0\$body\$TextBox3", "test");
+ $this->assertNotVisible('ctl0_body_ctl7');
+ $this->typeSpecial("ctl0\$body\$TextBox3", "test");
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl7');
- $this->typeAndWait("ctl0\$body\$TextBox3", "non test");
- $this->verifyNotVisible('ctl0_body_ctl7');
+ $this->assertVisible('ctl0_body_ctl7');
+ $this->typeSpecial("ctl0\$body\$TextBox3", "non test");
+ $this->assertNotVisible('ctl0_body_ctl7');
// submitting textbox with a button
$this->type("ctl0\$body\$TextBox1", "texttext");
- $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
- $this->verifyValue("ctl0\$body\$TextBox1", "You just entered 'texttext'.");
+ $this->byXPath("//input[@type='submit' and @value='Submit']")->click();
+ $this->assertValue("ctl0\$body\$TextBox1", "You just entered 'texttext'.");
// SafeText
- $this->verifyText("ctl0_body_Output","test");
- $this->typeAndWait("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>");
- $this->verifyText("ctl0_body_Output","malicious code");
+ $this->assertText("ctl0_body_Output","test");
+ $this->typeSpecial("ctl0\$body\$TextBox2","<a href=javascript:xxx>malicious code</a>");
+ $this->assertText("ctl0_body_Output","malicious code");
// password
- $this->verifyAttribute("ctl0\$body\$ctl9@type","password");
+ $this->assertAttribute("ctl0\$body\$ctl9@type","password");
// ------------------multiline textbox----------------------
@@ -64,28 +64,28 @@ End of message
");
// a disabled multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled");
+ $this->assertAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled");
// a read-only multiline textbox
- $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly");
- $this->verifyAttribute("ctl0\$body\$ctl13@wrap","off");
+ $this->assertAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly");
+ $this->assertAttribute("ctl0\$body\$ctl13@wrap","off");
// auto postback textbox
- $this->verifyValue("ctl0\$body\$ctl14", "change me");
- $this->typeAndWait("ctl0\$body\$ctl14", "change mes");
- $this->verifyValue("ctl0\$body\$ctl14", "text changed");
- $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
- $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box.
+ $this->assertValue("ctl0\$body\$ctl14", "change me");
+ $this->typeSpecial("ctl0\$body\$ctl14", "change mes");
+ $this->assertValue("ctl0\$body\$ctl14", "text changed");
+ $this->assertValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox.");
+ $this->assertValue("ctl0\$body\$ctl11", "This is a multiline text box.
In HTML, it is displayed as a textarea.
End of message
");
// textbox associated with a validator
- $this->verifyNotVisible('ctl0_body_ctl15');
- $this->type("ctl0\$body\$MultiTextBox3", "demo");
+ $this->assertNotVisible('ctl0_body_ctl15');
+ $this->typeSpecial("ctl0\$body\$MultiTextBox3", "demo");
// $this->pause(1000);
- $this->verifyVisible('ctl0_body_ctl15');
- $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo");
- $this->verifyNotVisible('ctl0_body_ctl15');
+ $this->assertVisible('ctl0_body_ctl15');
+ $this->typeSpecial("ctl0\$body\$MultiTextBox3", "non demo");
+ $this->assertNotVisible('ctl0_body_ctl15');
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
index 5e7018c4..7ac55349 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php
@@ -1,24 +1,24 @@
<?php
-class QuickstartWizard1TestCase extends PradoGenericSeleniumTest
+class QuickstartWizard1TestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// step 1
- $this->verifyTextPresent('Wizard Step 1');
- $this->verifyTextNotPresent('Wizard Step 2');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0$body$Wizard1$DropDownList1', "label=Purple");
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
+ $this->assertContains('Wizard Step 1', $this->source());
+ $this->assertNotContains('Wizard Step 2', $this->source());
+ $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
+ $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
+ $this->select('ctl0$body$Wizard1$DropDownList1', "Purple");
+ $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click();
// step 2
- $this->verifyTextPresent('Your favorite color is: Purple');
- $this->verifyTextNotPresent('Wizard Step 1');
- $this->verifyTextPresent('Wizard Step 2');
+ $this->assertContains('Your favorite color is: Purple', $this->source());
+ $this->assertNotContains('Wizard Step 1', $this->source());
+ $this->assertContains('Wizard Step 2', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
index a77280ff..85ef8655 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php
@@ -1,24 +1,24 @@
<?php
-class QuickstartWizard2TestCase extends PradoGenericSeleniumTest
+class QuickstartWizard2TestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// step 1
- $this->verifyTextPresent('Please let us know your preference');
- $this->verifyTextNotPresent('Thank you for your answer');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0$body$Wizard1$DropDownList1', "label=Blue");
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
+ $this->assertContains('Please let us know your preference', $this->source());
+ $this->assertNotContains('Thank you for your answer', $this->source());
+ $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
+ $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled');
+ $this->select('ctl0$body$Wizard1$DropDownList1', "Blue");
+ $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click();
// step 2
- $this->verifyTextPresent('Your favorite color is: Blue');
- $this->verifyTextNotPresent('Please let us know your preference');
- $this->verifyTextPresent('Thank you for your answer');
+ $this->assertContains('Your favorite color is: Blue', $this->source());
+ $this->assertNotContains('Please let us know your preference', $this->source());
+ $this->assertContains('Thank you for your answer', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
index ec0efe90..2568f233 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php
@@ -1,44 +1,44 @@
<?php
-class QuickstartWizard3TestCase extends PradoGenericSeleniumTest
+class QuickstartWizard3TestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// step 1
- $this->verifyTextPresent('A Mini Survey');
- $this->verifyTextPresent('PRADO QuickStart Sample');
- $this->click('ctl0_body_Wizard3_StudentCheckBox');
- $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
+ $this->assertContains('A Mini Survey', $this->source());
+ $this->assertContains('PRADO QuickStart Sample', $this->source());
+ $this->byId('ctl0_body_Wizard3_StudentCheckBox')->click();
+ $this->byName('ctl0$body$Wizard3$ctl4$ctl0')->click();
// step 2
- $this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry");
- $this->clickAndWait('ctl0$body$Wizard3$ctl5$ctl1');
+ $this->select('ctl0$body$Wizard3$DropDownList11', "Chemistry");
+ $this->byName('ctl0$body$Wizard3$ctl5$ctl1')->click();
// step 3
- $this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis");
- $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
+ $this->select('ctl0$body$Wizard3$DropDownList22', "Tennis");
+ $this->byName('ctl0$body$Wizard3$ctl6$ctl1')->click();
// step 4
- $this->verifyTextPresent('You are a college student');
- $this->verifyTextPresent('You are in major: Chemistry');
- $this->verifyTextPresent('Your favorite sport is: Tennis');
+ $this->assertContains('You are a college student', $this->source());
+ $this->assertContains('You are in major: Chemistry', $this->source());
+ $this->assertContains('Your favorite sport is: Tennis', $this->source());
// run the example again. this time we skip the page asking about major
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&amp;notheme=true", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&amp;notheme=true");
// step 1
- $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0');
+ $this->byName('ctl0$body$Wizard3$ctl4$ctl0')->click();
// step 3
- $this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball");
- $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1');
+ $this->select('ctl0$body$Wizard3$DropDownList22', "Baseball");
+ $this->byName('ctl0$body$Wizard3$ctl6$ctl1')->click();
// step 4
- $this->verifyTextNotPresent('You are a college student');
- $this->verifyTextPresent('Your favorite sport is: Baseball');
+ $this->assertNotContains('You are a college student', $this->source());
+ $this->assertContains('Your favorite sport is: Baseball', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
index f2b8ad6e..41d3463e 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php
@@ -1,42 +1,42 @@
<?php
-class QuickstartWizard4TestCase extends PradoGenericSeleniumTest
+class QuickstartWizard4TestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// step 1
- $this->verifyTextPresent('Step 1 of 3');
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton');
+ $this->assertContains('Step 1 of 3', $this->source());
+ $this->select('ctl0_body_Wizard1_DropDownList1', "Cyan");
+ $this->byId('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton')->click();
// step 3
- $this->verifyTextPresent('Step 3 of 3');
- $this->verifyTextPresent('Thank you for completing this survey.');
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
+ $this->assertContains('Step 3 of 3', $this->source());
+ $this->assertContains('Thank you for completing this survey.', $this->source());
+ $this->byId('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton')->click();
// step 1
$this->assertSelected('ctl0_body_Wizard1_DropDownList1', "Cyan");
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Black");
- $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0');
+ $this->select('ctl0_body_Wizard1_DropDownList1', "Black");
+ $this->byId('ctl0_body_Wizard1_ctl4_ctl0')->click();
// step 2
- $this->verifyTextPresent('Step 2 of 3');
- $this->verifyTextPresent('Your favorite color is: Black');
- $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl0');
+ $this->assertContains('Step 2 of 3', $this->source());
+ $this->assertContains('Your favorite color is: Black', $this->source());
+ $this->byId('ctl0_body_Wizard1_ctl5_ctl0')->click();
// step 1
- $this->verifyTextPresent('Step 1 of 3');
+ $this->assertContains('Step 1 of 3', $this->source());
$this->assertSelected('ctl0_body_Wizard1_DropDownList1', "Black");
- $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0');
+ $this->byId('ctl0_body_Wizard1_ctl4_ctl0')->click();
// step 2
- $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl1');
+ $this->byId('ctl0_body_Wizard1_ctl5_ctl1')->click();
// step 3
- $this->verifyTextPresent('Step 3 of 3');
+ $this->assertContains('Step 3 of 3', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
index eb5edb3b..4c41a074 100755
--- a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php
@@ -1,35 +1,35 @@
<?php
-class QuickstartWizard5TestCase extends PradoGenericSeleniumTest
+class QuickstartWizard5TestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&amp;notheme=true&amp;lang=en");
- $this->verifyTitle("PRADO QuickStart Sample", "");
+ $this->assertEquals("PRADO QuickStart Sample", $this->title());
// step 1
- $this->verifyTextPresent('Please let us know your preference');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
- $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
- $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled');
- $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan");
- $this->clickAndWait('ctl0$body$Wizard1$ctl4$ctl0');
+ $this->assertContains('Please let us know your preference', $this->source());
+ $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton');
+ $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
+ $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled');
+ $this->select('ctl0_body_Wizard1_DropDownList1', "Cyan");
+ $this->byName('ctl0$body$Wizard1$ctl4$ctl0')->click();
// step 2
- $this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0');
+ $this->select('ctl0_body_Wizard1_Step2_DropDownList2','Football');
+ $this->byName('ctl0$body$Wizard1$ctl6$ctl0')->click();
// step 1
$this->assertSelected('ctl0_body_Wizard1_DropDownList1','Cyan');
- $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton');
+ $this->byId('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton')->click();
// step 2
$this->assertSelected('ctl0_body_Wizard1_Step2_DropDownList2','Football');
- $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1');
+ $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click();
// step 3
- $this->verifyTextPresent('Your favorite color is: Cyan');
- $this->verifyTextPresent('Your favorite sport is: Football');
+ $this->assertContains('Your favorite color is: Cyan', $this->source());
+ $this->assertContains('Your favorite sport is: Football', $this->source());
}
}
diff --git a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php
index 3d531b47..8f5557ca 100755
--- a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php
+++ b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php
@@ -1,32 +1,32 @@
<?php
-class QuickstartHangmanTestCase extends PradoGenericSeleniumTest
+class QuickstartHangmanTestCase extends PradoGenericSelenium2Test
{
function test ()
{
- $this->open("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&amp;notheme=true&amp;lang=en", "");
- $this->verifyTitle("Hangman Game", "");
- $this->verifyTextPresent("Medium game; you are allowed 5 misses.", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("You must choose a difficulty level", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='3']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("Please make a guess", "");
- $this->verifyTextPresent("maximum of 3", "");
- $this->clickAndWait("link=B", "");
- $this->clickAndWait("link=F", "");
- $this->clickAndWait("link=Give up?", "");
- $this->verifyTextPresent("You Lose", "");
- $this->clickAndWait("link=Start Again", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("Please make a guess", "");
- $this->verifyTextPresent("maximum of 3", "");
- $this->clickAndWait("link=Give up?", "");
- $this->verifyTextPresent("You Lose", "");
- $this->clickAndWait("link=Start Again", "");
- $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='5']", "");
- $this->clickAndWait("//input[@type='submit' and @value='Play!']", "");
- $this->verifyTextPresent("maximum of 5", "");
+ $this->url("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&amp;notheme=true&amp;lang=en");
+ $this->assertEquals("Hangman Game", $this->title());
+ $this->assertContains("Medium game; you are allowed 5 misses.", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Play!']")->click();
+ $this->assertContains("You must choose a difficulty level", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Play!']")->click();
+ $this->byXPath("//input[@name='ctl0\$body\$LevelSelection' and @value='3']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Play!']")->click();
+ $this->assertContains("Please make a guess", $this->source());
+ $this->assertContains("maximum of 3", $this->source());
+ $this->byLinkText("B")->click();
+ $this->byLinkText("F")->click();
+ $this->byLinkText("Give up?")->click();
+ $this->assertContains("You Lose", $this->source());
+ $this->byLinkText("Start Again")->click();
+ $this->byXPath("//input[@type='submit' and @value='Play!']")->click();
+ $this->assertContains("Please make a guess", $this->source());
+ $this->assertContains("maximum of 3", $this->source());
+ $this->byLinkText("Give up?")->click();
+ $this->assertContains("You Lose", $this->source());
+ $this->byLinkText("Start Again")->click();
+ $this->byXPath("//input[@name='ctl0\$body\$LevelSelection' and @value='5']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Play!']")->click();
+ $this->assertContains("maximum of 5", $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php
index 9aecda84..0165edac 100755
--- a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php
+++ b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php
@@ -6,7 +6,6 @@
* @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
* @copyright Copyright &copy; 2007, CERAM Sophia Antipolis
* @license url nameoflicense
- * @version $Id: ToggleImageButton.php 2043 2007-06-30 15:07:50Z xue $
*
*/
diff --git a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php
index 934efcef..7bc53ba3 100755
--- a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php
+++ b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php
@@ -1,16 +1,15 @@
<?php
/**
*
- *
+ *
* @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
* @copyright Copyright &copy; 2007, CERAM Sophia Antipolis
* @license url nameoflicense
- * @version $Id: ExtendedToggleImageButton.php 2039 2007-06-28 08:41:57Z tof $
- *
+ *
*/
prado::using ('Application.controls.ToggleImageButton');
class ExtendedToggleImageButton extends ToggleImageButton {
-
+
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl
index bf2f8fab..b245a50d 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Layout.tpl
+++ b/tests/FunctionalTests/tickets/protected/pages/Layout.tpl
@@ -1,7 +1,7 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<com:THead Title="PRADO Functional Tests">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
@@ -30,7 +30,6 @@
<com:TContentPlaceHolder ID="Content" />
<hr style="margin-top: 2em" />
-<com:TJavascriptLogger />
</com:TForm>
<div class="w3c">
<a href="http://validator.w3.org/check?uri=referer">
@@ -38,7 +37,7 @@
</a>
<a href="?page=ViewSource&amp;path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
style="margin: 0 1em;"
- onclick="window.open(this.href); return false;"
+ onclick="window.open(this.href); return false;"
onkeypress="window.open(this.href); return false;">View Source</a>
</div>
</body>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
index e4c8fa95..395657ec 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page
@@ -21,10 +21,10 @@
{
element = $("<%= $this->label1->ClientID %>");
if(element)
- element.innerHTML = "Label 1: "+inspect(ClientScriptInfo);
+ element.innerHTML = "Label 1: "+ClientScriptInfo.join('; ');
else
alert("failed");
});
</com:TClientScript>
-</com:TContent> \ No newline at end of file
+</com:TContent>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page
index e9d40b92..3d4bf647 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page
@@ -1,18 +1,17 @@
<com:TContent ID="Content">
- <h3>Needs manual testing</h3>
<com:TPanel ID="panel1" DefaultButton="button2"
Style="border:1px solid #ccc; padding:2em">
<com:TTextBox ID="textbox1" />
-
+
<com:TCustomValidator
ControlToValidate="textbox1"
OnServerValidate="customValidate"
ValidationGroup="group1"
ErrorMessage="required" />
-
- <com:TButton ID="button1" Text="Button 1"
+
+ <com:TButton ID="button1" Text="Button 1"
ValidationGroup="group1" OnClick="button_clicked" />
- <com:TButton ID="button2" Text="Button 2 (default)"
+ <com:TButton ID="button2" Text="Button 2 (default)"
ValidationGroup="group1" OnClick="button_clicked" />
<com:TLabel ID="label1" Text="Label 1" />
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page
index 29751cab..31bc7237 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page
@@ -1,5 +1,4 @@
<com:TContent ID="Content">
-<h3>Needs manual testing</h3>
<com:TPanel DefaultButton="button2" Style="border:1px solid #ccc; padding:2em;">
<com:TTextBox ID="text1" />
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl
index bf2f8fab..b245a50d 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl
@@ -1,7 +1,7 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<com:THead Title="PRADO Functional Tests">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
@@ -30,7 +30,6 @@
<com:TContentPlaceHolder ID="Content" />
<hr style="margin-top: 2em" />
-<com:TJavascriptLogger />
</com:TForm>
<div class="w3c">
<a href="http://validator.w3.org/check?uri=referer">
@@ -38,7 +37,7 @@
</a>
<a href="?page=ViewSource&amp;path=<%= str_replace('.','/', $this->Request->ServiceParameter) %>.page"
style="margin: 0 1em;"
- onclick="window.open(this.href); return false;"
+ onclick="window.open(this.href); return false;"
onkeypress="window.open(this.href); return false;">View Source</a>
</div>
</body>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php
index cb266fd7..85b87d55 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php
@@ -1,12 +1,11 @@
<?php
/**
*
- *
+ *
* @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
* @copyright Copyright &copy; 2007, CERAM Sophia Antipolis
* @license url nameoflicense
- * @version $Id: Ticket659.php 2039 2007-06-28 08:41:57Z tof $
- *
+ *
*/
prado::using ('Application.pages.ExtendedToggleImageButton');
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
index adf71837..f254cf6d 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket703/Ticket703.php
@@ -6,24 +6,24 @@ class Ticket703 extends TPage {
parent::onLoad($param);
if (!$this->isPostBack && !$this->isCallback)
{
- $this->refreshLog();
+ $this->clearLog(null, null);
}
}
-
+
public function refreshLog ()
{
$this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'));
}
-
+
public function clearLog ($sender, $param)
{
$file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt');
file_put_contents($file, '');
$this->refreshLog();
}
-
+
public function addLog($sender,$param)
{
- prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets");
+ prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets");
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page
index b36d2d66..3f2bc17b 100755
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page
@@ -1,5 +1,4 @@
<com:TContent id="Content">
-<h3>Needs manual testing</h3>
<style>
.autocomplete
{
@@ -45,7 +44,7 @@ ul.different
OnSuggest="suggestCountries" Separator=", "
OnSuggestionSelected="suggestion_selected"
ResultPanel.CssClass="autocomplete" CausesValidation="false" />
-
+
</p>
<p>
<com:TButton OnClick="validForm" Text="Validate Form" /><br/>
diff --git a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page
index 0d633657..0d633657 100644..100755
--- a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page
+++ b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.page
diff --git a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php
index 73a2cc57..98492ffb 100644..100755
--- a/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php
+++ b/tests/FunctionalTests/tickets/protected/pages/ToggleTest.php
@@ -1,12 +1,11 @@
<?php
/**
*
- *
+ *
* @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
* @copyright Copyright &copy; 2007, CERAM Sophia Antipolis
* @license url nameoflicense
- * @version $Id: ToggleTest.php 2039 2007-06-28 08:41:57Z tof $
- *
+ *
*/
prado::using ('Application.controls.ToggleImageButton');
@@ -15,5 +14,4 @@ class ToggleTest extends TPage {
public function clickToggleButton ($sender, $param) {
$this->lbl->Text=$sender->State;
}
-}
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
index 20a4096b..0c6945ba 100755
--- a/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Issue120TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Issue120TestCase extends PradoGenericSeleniumTest
+class Issue120TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Issue120');
- $this->assertTextPresent('TActiveDropDownList PromptValue Test');
-
+ $this->url('tickets/index.php?page=Issue120');
+ $this->assertContains('TActiveDropDownList PromptValue Test', $this->source());
+
$this->assertSelectedIndex("ctl0_Content_ddl1", 0);
$this->assertSelectedValue("ctl0_Content_ddl1", 'PromptValue');
-
- $this->click("ctl0_Content_btn1");
+
+ $this->byId("ctl0_Content_btn1")->click();
$this->pause(800);
$this->assertSelectedIndex("ctl0_Content_ddl1", 0);
diff --git a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
index 375f90a7..d71db0e1 100755
--- a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php
@@ -1,25 +1,25 @@
<?php
-class Issue216TestCase extends PradoGenericSeleniumTest
+class Issue216TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Issue216');
- $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request');
-
+ $this->url('tickets/index.php?page=Issue216');
+ $this->assertContains('TTabPanel doesn\'t preserve active tab on callback request', $this->source());
+
$this->assertVisible('ctl0_Content_tab1');
- $this->click("ctl0_Content_btn1");
+ $this->byId("ctl0_Content_btn1")->click();
$this->pause(800);
$this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 0");
- $this->click("ctl0_Content_tab2_0");
+ $this->byId("ctl0_Content_tab2_0")->click();
$this->pause(800);
$this->assertVisible('ctl0_Content_tab2');
- $this->click("ctl0_Content_btn1");
+ $this->byId("ctl0_Content_btn1")->click();
$this->pause(800);
$this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 1");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
index 905a31a4..547ffb38 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
@@ -1,17 +1,17 @@
<?php
-class Ticket121TestCase extends PradoGenericSeleniumTest
+class Ticket121TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket121');
+ $this->url('tickets/index.php?page=Ticket121');
$this->type("ctl0\$Content\$FooTextBox", "");
- $this->verifyNotVisible('ctl0_Content_ctl1');
- $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
- $this->verifyVisible('ctl0_Content_ctl1');
+ $this->assertNotVisible('ctl0_Content_ctl1');
+ $this->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click();
+ $this->assertVisible('ctl0_Content_ctl1');
$this->type("ctl0\$Content\$FooTextBox", "content");
- $this->clickAndWait("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
- $this->verifyNotVisible('ctl0_Content_ctl1');
- $this->verifyTextPresent("clicked at", "");
+ $this->byXPath("//input[@type='image' and @id='ctl0_Content_ctl0']")->click();
+ $this->assertNotVisible('ctl0_Content_ctl1');
+ $this->assertContains("clicked at", $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php
index 1727ac40..20d9c645 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket163TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket163TestCase extends PradoGenericSeleniumTest
+class Ticket163TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket163');
- $this->assertTextPresent('kr 100,00');
- $this->assertTextPresent('kr 0,00');
- $this->assertTextPresent('-kr 100,00');
+ $this->url('tickets/index.php?page=Ticket163');
+ $this->assertContains('kr 100,00', $this->source());
+ $this->assertContains('kr 0,00', $this->source());
+ $this->assertContains('-kr 100,00', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php
index 9889ea50..47bb380b 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket169TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket169TestCase extends PradoGenericSeleniumTest
+class Ticket169TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket169');
+ $this->url('tickets/index.php?page=Ticket169');
$this->assertNotVisible('ctl0_Content_validator1');
- $this->click('ctl0_Content_ctl0');
+ $this->byId('ctl0_Content_ctl0')->click();
$this->assertVisible('ctl0_Content_validator1');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
index 88de08cc..c0bccaa9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php
@@ -1,14 +1,14 @@
<?php
-class Ticket191TestCase extends PradoGenericSeleniumTest
+class Ticket191TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket191');
+ $this->url('tickets/index.php?page=Ticket191');
$this->type("ctl0\$Content\$TextBox2", "test");
- $this->clickAndWait("name=ctl0\$Content\$ctl0");
+ $this->byName("ctl0\$Content\$ctl0")->click();
$this->type("ctl0\$Content\$TextBox", "test");
- $this->clickAndWait("name=ctl0\$Content\$ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl2');
+ $this->byName("ctl0\$Content\$ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl2');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
index 86768354..35274e6f 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket205TestCase.php
@@ -1,21 +1,29 @@
<?php
-class Ticket205TestCase extends PradoGenericSeleniumTest
+class Ticket205TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open("tickets/index.php?page=Ticket205");
- $this->assertTitle("Verifying Ticket 205");
- $this->assertNotVisible("{$base}validator1");
+ $this->url("tickets/index.php?page=Ticket205");
+ $this->assertEquals($this->title(), "Verifying Ticket 205");
+
+ $validator=$this->byId("{$base}validator1");
+ $this->assertFalse($validator->displayed());
$this->type("{$base}textbox1", "test");
- $this->click("{$base}button1");
- $this->assertAlert("error");
- $this->assertVisible("{$base}validator1");
+ $this->byId("{$base}button1")->click();
+
+ $this->assertEquals("error", $this->alertText());
+ $this->acceptAlert();
+
+ $this->assertTrue($validator->displayed());
+
+ // type() calls clear() that triggers a focus change and thus a second alert
+ $this->typeSpecial("{$base}textbox1", "Prado");
- $this->type("{$base}textbox1", "Prado");
- $this->clickAndWait("{$base}button1");
- $this->assertNotVisible("{$base}validator1");
+ $this->byId("{$base}button1")->click();
+ $validator=$this->byId("{$base}validator1");
+ $this->assertFalse($validator->displayed());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
index cd618a5d..cc993192 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket207TestCase.php
@@ -1,25 +1,28 @@
<?php
-class Ticket207TestCase extends PradoGenericSeleniumTest
+class Ticket207TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket207');
- $this->assertTitle("Verifying Ticket 207");
+ $this->url('tickets/index.php?page=Ticket207');
+ $this->assertEquals($this->title(), "Verifying Ticket 207");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
-
- $this->click("{$base}button1");
- $this->assertAlert('error on text1 fired');
+
+ $this->byId("{$base}button1")->click();
+
+ $this->assertEquals('error on text1 fired', $this->alertText());
+ $this->acceptAlert();
+
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
-
+
$this->type("{$base}text1", 'test');
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
@@ -27,8 +30,11 @@ class Ticket207TestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
- $this->click("{$base}button1");
- $this->assertAlert('error on text1 fired');
+ $this->byId("{$base}button1")->click();
+
+ $this->assertEquals('error on text1 fired', $this->alertText());
+ $this->acceptAlert();
+
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
index 5e48ff2d..b9a0f0c9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket21TestCase.php
@@ -1,14 +1,14 @@
<?php
-class Ticket21TestCase extends PradoGenericSeleniumTest
+class Ticket21TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket21');
- $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", "");
+ $this->url('tickets/index.php?page=Ticket21');
+ $this->assertEquals($this->title(), "Verifying Ticket 21");
+ $this->byId("ctl0_Content_button1")->click();
+ $this->assertContains("Radio button clicks: 1", $this->source());
+ $this->byId("ctl0_Content_button1")->click();
+ $this->assertContains("Radio button clicks: 1", $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
index da5e8c15..0ef67933 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Ticket220TestCase extends PradoGenericSeleniumTest
+class Ticket220TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket220');
- $this->assertTextPresent('ClientScript Test');
+ $this->url('tickets/index.php?page=Ticket220');
+ $this->assertContains('ClientScript Test', $this->source());
$this->assertText("{$base}label1", "Label 1");
- $this->click("button1");
- $this->assertText("{$base}label1", 'exact:Label 1: ["ok", "ok 3?", "ok 2!"]');
+ $this->byId("button1")->click();
+ $this->assertText("{$base}label1", 'Label 1: ok; ok 3?; ok 2!');
$this->assertAlertNotPresent();
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
index 3680eea1..74ad6505 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket225TestCase.php
@@ -1,22 +1,22 @@
<?php
-class Ticket225TestCase extends PradoGenericSeleniumTest
+class Ticket225TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket225');
- $this->assertTextPresent('RadioButton Group Tests');
+ $this->url('tickets/index.php?page=Ticket225');
+ $this->assertContains('RadioButton Group Tests', $this->source());
$this->assertText("{$base}label1", "Label 1");
$this->assertNotVisible("{$base}validator1");
- $this->click("{$base}button4");
+ $this->byId("{$base}button4")->click();
$this->assertVisible("{$base}validator1");
- $this->click("{$base}button2");
- $this->clickAndWait("{$base}button4");
+ $this->byId("{$base}button2")->click();
+ $this->byId("{$base}button4")->click();
- $this->assertText("{$base}label1", 'exact:ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3');
+ $this->assertText("{$base}label1", 'ctl0$Content$button1 ctl0$Content$button2 ctl0$Content$button3');
$this->assertNotVisible("{$base}validator1");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php
index 1f1c0fb9..3defa014 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket227TestCase.php
@@ -1,10 +1,10 @@
<?php
-class Ticket227TestCase extends PradoGenericSeleniumTest
+class Ticket227TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket227');
- $this->assertTitle('Verifying Ticket 227');
+ $this->url('tickets/index.php?page=Ticket227');
+ $this->assertEquals($this->title(), 'Verifying Ticket 227');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
index 57251d23..e5595a13 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket239TestCase.php
@@ -1,53 +1,53 @@
<?php
-class Ticket239TestCase extends PradoGenericSeleniumTest
+class Ticket239TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket239');
+ $this->url('tickets/index.php?page=Ticket239');
// view1
- $this->verifyTextPresent('view1 is activated','');
- $this->verifyTextNotPresent('view1 is deactivated','');
- $this->verifyTextNotPresent('view2 is activated','');
- $this->verifyTextNotPresent('view2 is deactivated','');
- $this->verifyTextNotPresent('view3 is activated','');
- $this->verifyTextNotPresent('view3 is deactivated','');
+ $this->assertContains('view1 is activated', $this->source());
+ $this->assertNotContains('view1 is deactivated', $this->source());
+ $this->assertNotContains('view2 is activated', $this->source());
+ $this->assertNotContains('view2 is deactivated', $this->source());
+ $this->assertNotContains('view3 is activated', $this->source());
+ $this->assertNotContains('view3 is deactivated', $this->source());
// goto view2
- $this->clickAndWait('name=ctl0$Content$ctl1');
- $this->verifyTextNotPresent('view1 is activated','');
- $this->verifyTextPresent('view1 is deactivated','');
- $this->verifyTextPresent('view2 is activated','');
- $this->verifyTextNotPresent('view2 is deactivated','');
- $this->verifyTextNotPresent('view3 is activated','');
- $this->verifyTextNotPresent('view3 is deactivated','');
+ $this->byName('ctl0$Content$ctl1')->click();
+ $this->assertNotContains('view1 is activated', $this->source());
+ $this->assertContains('view1 is deactivated', $this->source());
+ $this->assertContains('view2 is activated', $this->source());
+ $this->assertNotContains('view2 is deactivated', $this->source());
+ $this->assertNotContains('view3 is activated', $this->source());
+ $this->assertNotContains('view3 is deactivated', $this->source());
// goto view3
- $this->clickAndWait('name=ctl0$Content$ctl3');
- $this->verifyTextNotPresent('view1 is activated','');
- $this->verifyTextNotPresent('view1 is deactivated','');
- $this->verifyTextNotPresent('view2 is activated','');
- $this->verifyTextPresent('view2 is deactivated','');
- $this->verifyTextPresent('view3 is activated','');
- $this->verifyTextNotPresent('view3 is deactivated','');
+ $this->byName('ctl0$Content$ctl3')->click();
+ $this->assertNotContains('view1 is activated', $this->source());
+ $this->assertNotContains('view1 is deactivated', $this->source());
+ $this->assertNotContains('view2 is activated', $this->source());
+ $this->assertContains('view2 is deactivated', $this->source());
+ $this->assertContains('view3 is activated', $this->source());
+ $this->assertNotContains('view3 is deactivated', $this->source());
// goto view2
- $this->clickAndWait('name=ctl0$Content$ctl4');
- $this->verifyTextNotPresent('view1 is activated','');
- $this->verifyTextNotPresent('view1 is deactivated','');
- $this->verifyTextPresent('view2 is activated','');
- $this->verifyTextNotPresent('view2 is deactivated','');
- $this->verifyTextNotPresent('view3 is activated','');
- $this->verifyTextPresent('view3 is deactivated','');
+ $this->byName('ctl0$Content$ctl4')->click();
+ $this->assertNotContains('view1 is activated', $this->source());
+ $this->assertNotContains('view1 is deactivated', $this->source());
+ $this->assertContains('view2 is activated', $this->source());
+ $this->assertNotContains('view2 is deactivated', $this->source());
+ $this->assertNotContains('view3 is activated', $this->source());
+ $this->assertContains('view3 is deactivated', $this->source());
// goto view1
- $this->clickAndWait('name=ctl0$Content$ctl2');
- $this->verifyTextPresent('view1 is activated','');
- $this->verifyTextNotPresent('view1 is deactivated','');
- $this->verifyTextNotPresent('view2 is activated','');
- $this->verifyTextPresent('view2 is deactivated','');
- $this->verifyTextNotPresent('view3 is activated','');
- $this->verifyTextNotPresent('view3 is deactivated','');
+ $this->byName('ctl0$Content$ctl2')->click();
+ $this->assertContains('view1 is activated', $this->source());
+ $this->assertNotContains('view1 is deactivated', $this->source());
+ $this->assertNotContains('view2 is activated', $this->source());
+ $this->assertContains('view2 is deactivated', $this->source());
+ $this->assertNotContains('view3 is activated', $this->source());
+ $this->assertNotContains('view3 is deactivated', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php
index bedd6e2c..7c4fe364 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket246TestCase.php
@@ -1,10 +1,10 @@
<?php
-class Ticket246TestCase extends PradoGenericSeleniumTest
+class Ticket246TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket246');
- $this->assertTitle('Verifying Ticket 246');
+ $this->url('tickets/index.php?page=Ticket246');
+ $this->assertEquals($this->title(), 'Verifying Ticket 246');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php
index b2b17de7..ebb60ca9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php
@@ -1,21 +1,21 @@
<?php
-class Ticket274TestCase extends PradoGenericSeleniumTest
+class Ticket274TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket274');
- $this->assertTitle('Verifying Ticket 274');
+ $this->url('tickets/index.php?page=Ticket274');
+ $this->assertEquals($this->title(), 'Verifying Ticket 274');
$this->assertNotVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
- $this->clickAndWait($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->type($base.'MyDate', 'asd');
- $this->clickAndWait($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertNotVisible($base.'validator1');
$this->assertVisible($base.'validator2');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php
index 4bfffede..ca11f626 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket278TestCase.php
@@ -1,28 +1,28 @@
<?php
-class Ticket278TestCase extends PradoGenericSeleniumTest
+class Ticket278TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket278');
- $this->assertTitle('Verifying Ticket 278');
+ $this->url('tickets/index.php?page=Ticket278');
+ $this->assertEquals($this->title(), 'Verifying Ticket 278');
$this->assertNotVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->assertNotVisible($base.'panel1');
- $this->click($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->type($base.'text1', 'asd');
- $this->clickAndWait($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertNotVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->assertNotVisible($base.'panel1');
- $this->click($base.'check1');
- $this->click($base.'button1');
+ $this->byId($base.'check1')->click();
+ $this->byId($base.'button1')->click();
$this->assertNotVisible($base.'validator1');
$this->assertVisible($base.'validator2');
$this->assertVisible($base.'panel1');
@@ -30,21 +30,21 @@ class Ticket278TestCase extends PradoGenericSeleniumTest
$this->type($base.'text1', '');
$this->type($base.'text2', 'asd');
- $this->click($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->assertVisible($base.'panel1');
$this->type($base.'text1', 'asd');
- $this->clickAndWait($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertNotVisible($base.'validator1');
$this->assertNotVisible($base.'validator2');
$this->assertVisible($base.'panel1');
$this->type($base.'text1', '');
$this->type($base.'text2', '');
- $this->click($base.'button1');
+ $this->byId($base.'button1')->click();
$this->assertVisible($base.'validator1');
$this->assertVisible($base.'validator2');
$this->assertVisible($base.'panel1');
diff --git a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php
index 7defd7ae..bc478895 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket27TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Ticket27TestCase extends PradoGenericSeleniumTest
+class Ticket27TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket27');
- $this->verifyTitle("Verifying Ticket 27", "");
- $this->click("//input[@value='Agree']", "");
- $this->assertVisible("ctl0_Content_validator1", "");
+ $this->url('tickets/index.php?page=Ticket27');
+ $this->assertEquals("Verifying Ticket 27", $this->title());
+ $this->byXPath("//input[@value='Agree']")->click();
+ $this->assertVisible("ctl0_Content_validator1");
$this->type("ctl0_Content_TextBox", "122");
- $this->assertNotVisible("ctl0_Content_validator1", "");
- $this->clickAndWait("//input[@value='Disagree']", "");
- $this->assertNotVisible("ctl0_Content_validator1", "");
+ $this->assertNotVisible("ctl0_Content_validator1");
+ $this->byXPath("//input[@value='Disagree']")->click();
+ $this->assertNotVisible("ctl0_Content_validator1");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
index d28ea771..b4a32c19 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket284TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket284TestCase extends PradoGenericSeleniumTest
+class Ticket284TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket284');
- $this->assertTextPresent('Verifying Ticket 284');
- $this->click('ctl0_Content_ctl1');
-
+ $this->url('tickets/index.php?page=Ticket284');
+ $this->assertContains('Verifying Ticket 284', $this->source());
+ $this->byId('ctl0_Content_ctl1')->click();
+
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
index 8b996964..04a451df 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket285TestCase.php
@@ -1,11 +1,11 @@
<?php
-class Ticket285TestCase extends PradoGenericSeleniumTest
+class Ticket285TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket285');
- $this->assertTextPresent('350.00');
- $this->assertTextPresent('349.99');
+ $this->url('tickets/index.php?page=Ticket285');
+ $this->assertContains('350.00', $this->source());
+ $this->assertContains('349.99', $this->source());
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php
index 1f64b3f9..92bf1eb9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php
@@ -1,13 +1,13 @@
<?php
-class Ticket28TestCase extends PradoGenericSeleniumTest
+class Ticket28TestCase extends PradoGenericSelenium2Test
{
-
+
function test()
{
- $this->open('tickets/index.php?page=Ticket28');
- $this->assertTextPresent('Label 1');
- $this->clickAndWait('link=Click Me');
- $this->assertTextPresent('Link Button 1 Clicked!');
+ $this->url('tickets/index.php?page=Ticket28');
+ $this->assertContains('Label 1', $this->source());
+ $this->byLinkText("Click Me")->click();
+ $this->assertContains('Link Button 1 Clicked!', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php
index f541d63d..8116e753 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php
@@ -1,28 +1,27 @@
<?php
/**
-*
+*
*/
-class Ticket290TestCase extends PradoGenericSeleniumTest
+class Ticket290TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket290');
- $this->assertTitle("Verifying Ticket 290");
-
+ $this->url('tickets/index.php?page=Ticket290');
+ $this->assertEquals($this->title(), "Verifying Ticket 290");
+
$this->assertText("{$base}label1", "Label 1");
$this->assertText("{$base}label2", "Label 2");
$this->type("{$base}textbox1", "test");
- // bad hack to simulate enter key..
- $this->submit('ctl0_ctl1');
+
+ $this->byId("{$base}textbox1")->click();
+ $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER);
$this->pause(800);
-
- $this->assertText("{$base}label1", "Doing Validation");
- // this can't work properly without manual testing
- //$this->assertText("{$base}label2", "Button 2 (default) Clicked!");
+ $this->assertText("{$base}label1", "Doing Validation");
+ $this->assertText("{$base}label2", "Button 2 (default) Clicked!");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php
index b8462988..aae4ee21 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket433TestCase.php
@@ -1,15 +1,15 @@
<?php
-class Ticket433TestCase extends PradoGenericSeleniumTest
+class Ticket433TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket433');
- $this->assertTitle("Verifying Ticket 433");
+ $this->url('tickets/index.php?page=Ticket433');
+ $this->assertEquals($this->title(), "Verifying Ticket 433");
$this->assertText("{$base}VoteClick", "BEFORE click");
- $this->click("{$base}VoteClick");
+ $this->byId("{$base}VoteClick")->click();
$this->pause(800);
$this->assertText("{$base}VoteClick", "AFTER click CALLBACK DONE");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php
index c393de91..f586a6c9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket439TestCase.php
@@ -1,15 +1,14 @@
<?php
-class Ticket439TestCase extends PradoGenericSeleniumTest
+class Ticket439TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket439');
- $this->assertTitle("Verifying Ticket 439");
- $this->click("{$base}button1");
- $this->waitForPageToLoad(3000);
+ $this->url('tickets/index.php?page=Ticket439');
+ $this->assertEquals($this->title(), "Verifying Ticket 439");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertTitle("Verifying Home");
+ $this->assertEquals($this->title(), "Verifying Home");
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php
index 34ffb8fd..14f00970 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket463TestCase.php
@@ -1,11 +1,11 @@
<?php
-class Ticket463TestCase extends PradoGenericSeleniumTest
+class Ticket463TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket463');
- $this->verifyTitle("Verifying Ticket 463", "");
- $this->assertTextPresent('May 1, 2005 12:00:00 AM');
+ $this->url('tickets/index.php?page=Ticket463');
+ $this->assertEquals("Verifying Ticket 463", $this->title());
+ $this->assertContains('May 1, 2005 12:00:00 AM', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php
index 4a2804ea..a3e25e85 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket470TestCase.php
@@ -1,31 +1,31 @@
<?php
-class Ticket470TestCase extends PradoGenericSeleniumTest
+class Ticket470TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket470');
- $this->verifyTitle("Verifying Ticket 470");
+ $this->url('tickets/index.php?page=Ticket470');
+ $this->assertEquals("Verifying Ticket 470", $this->title());
$this->assertText("{$base}counter", "0");
$this->assertText("{$base}Results", "");
$this->assertNotVisible("{$base}validator1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}counter", "0");
$this->assertText("{$base}Results", "");
$this->assertVisible("{$base}validator1");
$this->type("{$base}TextBox", "hello");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}counter", "0");
$this->assertText("{$base}Results", "OK!!!");
$this->assertNotVisible("{$base}validator1");
//reload
- $this->click("{$base}reloadButton");
+ $this->byId("{$base}reloadButton")->click();
$this->pause(800);
$this->assertValue("{$base}TextBox", "hello");
$this->assertText("{$base}counter", "1");
@@ -33,14 +33,14 @@ class Ticket470TestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}validator1");
$this->type("{$base}TextBox", "");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}counter", "1");
$this->assertText("{$base}Results", "");
$this->assertVisible("{$base}validator1");
-
+
$this->type("{$base}TextBox", "test");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("{$base}counter", "1");
$this->assertText("{$base}Results", "OK!!!");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
index 16ebc56e..7f9bc58c 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket477TestCase.php
@@ -1,21 +1,21 @@
<?php
-class Ticket477TestCase extends PradoGenericSeleniumTest
+class Ticket477TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket477');
- $this->assertTitle("Verifying Ticket 477");
+ $this->url('tickets/index.php?page=Ticket477');
+ $this->assertEquals($this->title(), "Verifying Ticket 477");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
- $this->clickAndWait("{$base}list1_c1");
+ $this->byId("{$base}list1_c1")->click();
$this->assertVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
- $this->clickAndWait("{$base}list2_c1");
+ $this->byId("{$base}list2_c1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
index c3b2f43f..e4b72aaf 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket488TestCase.php
@@ -1,40 +1,41 @@
<?php
-class Ticket488TestCase extends PradoGenericSeleniumTest
+class Ticket488TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('active-controls/index.php?page=CustomValidatorByPass');
- $this->assertTextPresent('Custom Login');
+ $base='ctl0_Content_';
+ $this->url('active-controls/index.php?page=CustomValidatorByPass');
+ $this->assertContains('Custom Login', $this->source());
$this->assertNotVisible('loginBox');
- $this->click("showLogin");
+ $this->byId("showLogin")->click();
$this->assertVisible("loginBox");
- $this->assertNotVisible("validator1");
- $this->assertNotVisible("validator2");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("checkLogin");
+ $this->byId("{$base}checkLogin")->click();
$this->pause(800);
- $this->assertVisible("validator1");
- $this->assertNotVisible("validator2");
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->type('Username', 'tea');
- $this->type('Password', 'mmama');
+ $this->type("{$base}Username", 'tea');
+ $this->type("{$base}Password", 'mmama');
- $this->click("checkLogin");
+ $this->byId("{$base}checkLogin")->click();
$this->pause(800);
- $this->assertNotVisible("validator1");
- $this->assertVisible("validator2");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
- $this->type('Password', 'test');
- $this->click("checkLogin");
+ $this->type("{$base}Password", 'test');
+ $this->byId("{$base}checkLogin")->click();
$this->pause(800);
- $this->assertNotVisible("validator1");
- $this->assertNotVisible("validator2");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
}
function test_more()
{
- $this->open('tickets/index.php?page=Ticket488');
+ $this->url('tickets/index.php?page=Ticket488');
//add test assertions here.
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php
index 63ecfe2f..f3bdd0a9 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket504TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket504TestCase extends PradoGenericSeleniumTest
+class Ticket504TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket504');
- $this->verifyTitle("Verifying Ticket 504", "");
+ $this->url('tickets/index.php?page=Ticket504');
+ $this->assertEquals("Verifying Ticket 504", $this->title());
$this->assertText("status", "");
@@ -15,7 +15,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest
$this->assertVisible("{$base}panelC");
$this->assertVisible("{$base}panelD");
- $this->click("{$base}linka");
+ $this->byId("{$base}linka")->click();
$this->pause(800);
$this->assertVisible("{$base}panelA");
$this->assertNotVisible("{$base}panelB");
@@ -23,7 +23,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}panelD");
$this->assertText("status", "panelA updated");
- $this->click("{$base}linkb");
+ $this->byId("{$base}linkb")->click();
$this->pause(800);
$this->assertNotVisible("{$base}panelA");
$this->assertVisible("{$base}panelB");
@@ -31,7 +31,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}panelD");
$this->assertText("status", "panelB updated");
- $this->click("{$base}linkc");
+ $this->byId("{$base}linkc")->click();
$this->pause(800);
$this->assertNotVisible("{$base}panelA");
$this->assertNotVisible("{$base}panelB");
@@ -39,7 +39,7 @@ class Ticket504TestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}panelD");
$this->assertText("status", "panelC updated");
- $this->click("{$base}linkd");
+ $this->byId("{$base}linkd")->click();
$this->pause(800);
$this->assertNotVisible("{$base}panelA");
$this->assertNotVisible("{$base}panelB");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php
index 19d54e9b..68c94b03 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Ticket507TestCase extends PradoGenericSeleniumTest
+class Ticket507TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base='ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket507');
- $this->verifyTitle("Verifying Ticket 507", "");
+ $this->url('tickets/index.php?page=Ticket507');
+ $this->assertEquals("Verifying Ticket 507", $this->title());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->select("{$base}list1", "item 1");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php
index 2df88612..71457b58 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php
@@ -1,15 +1,15 @@
<?php
-class Ticket521TestCase extends PradoGenericSeleniumTest
+class Ticket521TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open("tickets/index.php?page=Ticket521");
- $this->assertTitle("Verifying Ticket 521");
+ $this->url("tickets/index.php?page=Ticket521");
+ $this->assertEquals($this->title(), "Verifying Ticket 521");
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(1200);
$this->assertText("{$base}label1", "Button 1 was clicked on callback");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php
index 7476db69..c8659002 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket526TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Ticket526TestCase extends PradoGenericSeleniumTest
+class Ticket526TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket526');
- $this->verifyTitle("Verifying Ticket 526", "");
+ $this->url('tickets/index.php?page=Ticket526');
+ $this->assertEquals("Verifying Ticket 526", $this->title());
$this->assertElementNotPresent("{$base}dpbutton");
- $this->click("{$base}btn");
+ $this->byId("{$base}btn")->click();
$this->pause(800);
$this->assertElementPresent("{$base}dpbutton");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php
index 3903000a..7fb24d04 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket528TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket528TestCase extends PradoGenericSeleniumTest
+class Ticket528TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket528');
- $this->assertTitle("Verifying Ticket 528");
+ $this->url('tickets/index.php?page=Ticket528');
+ $this->assertEquals($this->title(), "Verifying Ticket 528");
$this->select("{$base}DDropTurno", "Tarde");
$this->pause(800);
diff --git a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php
index 26f5a7d7..eebd2336 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket535TestCase.php
@@ -1,34 +1,34 @@
<?php
-class Ticket535TestCase extends PradoGenericSeleniumTest
+class Ticket535TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket535');
- $this->assertTitle("Verifying Ticket 535");
+ $this->url('tickets/index.php?page=Ticket535');
+ $this->assertEquals($this->title(), "Verifying Ticket 535");
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}radio1");
- $this->click("{$base}button1");
+ $this->byId("{$base}radio1")->click();
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{}');
+ $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{}');
- $this->click("{$base}radio2");
- $this->click("{$base}button1");
+ $this->byId("{$base}radio2")->click();
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{1}');
+ $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{1}');
- $this->click("{$base}bad_radio1");
- $this->click("{$base}button2");
+ $this->byId("{$base}bad_radio1")->click();
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{1} bad_radio2 checked:{}');
+ $this->assertText("{$base}label1", 'bad_radio1 checked:{1} bad_radio2 checked:{}');
- $this->click("{$base}bad_radio2");
- $this->click("{$base}button2");
+ $this->byId("{$base}bad_radio2")->click();
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{} bad_radio2 checked:{1}');
+ $this->assertText("{$base}label1", 'bad_radio1 checked:{} bad_radio2 checked:{1}');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php
index 16b0f863..2970837f 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket538TestCase.php
@@ -1,17 +1,17 @@
<?php
-class Ticket538TestCase extends PradoGenericSeleniumTest
+class Ticket538TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket538');
- $this->verifyTitle("Verifying Ticket 538", "");
+ $this->url('tickets/index.php?page=Ticket538');
+ $this->assertEquals("Verifying Ticket 538", $this->title());
$this->assertText("{$base}ALLog", 'waiting for response...');
$this->select("{$base}DataViewer", "empty :(");
- $this->click("{$base}selectBtn");
+ $this->byId("{$base}selectBtn")->click();
$this->pause(800);
$this->assertText("{$base}ALLog", '0,');
@@ -21,7 +21,7 @@ class Ticket538TestCase extends PradoGenericSeleniumTest
$this->select("{$base}DataViewer", "G1: Steven=>10");
$this->addSelection("{$base}DataViewer", "G2: Kevin=>65");
- $this->click("{$base}selectBtn");
+ $this->byId("{$base}selectBtn")->click();
$this->pause(800);
$this->assertText("{$base}ALLog", '4- "test1", 10- "test2",');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php
index f8e5a469..cf1433b6 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket54TestCase.php
@@ -1,10 +1,10 @@
<?php
-class Ticket54TestCase extends PradoGenericSeleniumTest
+class Ticket54TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket54');
- $this->verifyTextPresent("|A|a|B|b|C|", "");
+ $this->url('tickets/index.php?page=Ticket54');
+ $this->assertContains("|A|a|B|b|C|", $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php
index 996d72e9..cccdbaf3 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket573TestCase.php
@@ -1,11 +1,11 @@
<?php
-class Ticket573TestCase extends PradoGenericSeleniumTest
+class Ticket573TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket573');
- $this->verifyTitle("Verifying Ticket 573", "");
+ $this->url('tickets/index.php?page=Ticket573');
+ $this->assertEquals("Verifying Ticket 573", $this->title());
$this->assertText('test1', '10.00');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php
index 47330326..948d8642 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket578TestCase.php
@@ -1,22 +1,27 @@
<?php
-class Ticket578TestCase extends PradoGenericSeleniumTest
+class Ticket578TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket578');
- $this->verifyTitle("Verifying Ticket 578", "");
+ $this->url('tickets/index.php?page=Ticket578');
+ $this->assertEquals("Verifying Ticket 578", $this->title());
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}button1", "");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", "Button 1 was clicked : ");
+ $this->assertText("{$base}label1", "Button 1 was clicked :");
$text="helloworld";
- $this->runScript("tinyMCE.get('{$base}text1').setContent('{$text}')");
- $this->click("{$base}button1", "");
+
+ $this->execute(array(
+ 'script' => "tinyMCE.get('{$base}text1').setContent('{$text}')",
+ 'args' => array()
+ ));
+
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", "exact:Button 1 was clicked : <p>{$text}</p>");
+ $this->assertText("{$base}label1", "Button 1 was clicked : <p>{$text}</p>");
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php
index 8b2d36b3..58b42c33 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket585TestCase.php
@@ -1,23 +1,23 @@
<?php
-class Ticket585TestCase extends PradoGenericSeleniumTest
+class Ticket585TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket585');
- $this->verifyTitle("Verifying Ticket 585", "");
+ $this->url('tickets/index.php?page=Ticket585');
+ $this->assertEquals("Verifying Ticket 585", $this->title());
$this->assertText("error", "");
$this->assertNotVisible("{$base}validator1");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("error", "Success");
$this->assertNotVisible("{$base}validator1");
$this->type("{$base}test", "15-03-2007");
- $this->click("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertText("error", "Error");
$this->assertVisible("{$base}validator1");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
index 612c086a..5fd47f86 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket586TestCase.php
@@ -1,15 +1,15 @@
<?php
-class Ticket586TestCase extends PradoGenericSeleniumTest
+class Ticket586TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket586');
- $this->verifyTitle("Verifying Ticket 586", "");
+ $this->url('tickets/index.php?page=Ticket586');
+ $this->assertEquals("Verifying Ticket 586", $this->title());
$this->assertText("{$base}label1", "Status");
- $this->clickAndWait("{$base}button1");
+ $this->byId("{$base}button1")->click();
$this->assertText("{$base}label1", "Button 1 Clicked!");
$this->type("{$base}text1", "testing");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php
index d5064c1e..cb42c343 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket587TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket587TestCase extends PradoGenericSeleniumTest
+class Ticket587TestCase extends PradoGenericSelenium2Test
{
function testKeyPress()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket587_reopened');
- $this->assertTitle("Verifying Ticket 587_reopened");
+ $this->url('tickets/index.php?page=Ticket587_reopened');
+ $this->assertEquals($this->title(), "Verifying Ticket 587_reopened");
$this->assertText($base."label1", "Label 1");
$this->select($base."list1", "item 3");
@@ -16,7 +16,6 @@ class Ticket587TestCase extends PradoGenericSeleniumTest
$this->assertText($base."label1", "Selection 2: value 3 - item 4");
$this->type($base.'text1', 't');
- $this->runScript("Prado.Registry.get('{$base}text1').onKeyPress({})");
$this->pause(800);
$this->select($base."list2", "asd 3 - item 2");
$this->pause(800);
@@ -26,8 +25,8 @@ class Ticket587TestCase extends PradoGenericSeleniumTest
function testButtonClick()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket587_reopened');
- $this->assertTitle("Verifying Ticket 587_reopened");
+ $this->url('tickets/index.php?page=Ticket587_reopened');
+ $this->assertEquals($this->title(), "Verifying Ticket 587_reopened");
$this->assertText($base."label1", "Label 1");
$this->select($base."list1", "item 3");
@@ -36,7 +35,7 @@ class Ticket587TestCase extends PradoGenericSeleniumTest
$this->pause(800);
$this->assertText($base."label1", "Selection 2: value 3 - item 4");
- $this->click($base.'button6');
+ $this->byId($base.'button6')->click();
$this->pause(800);
$this->select($base."list2", "asd 3 - item 2");
$this->pause(800);
diff --git a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php
index ec8d2284..692e2451 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket592TestCase.php
@@ -1,45 +1,45 @@
<?php
-class Ticket592TestCase extends PradoGenericSeleniumTest
+class Ticket592TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket592');
- $this->assertTitle("Verifying Ticket 592");
+ $this->url('tickets/index.php?page=Ticket592');
+ $this->assertEquals($this->title(), "Verifying Ticket 592");
$this->assertText("{$base}label1", "Label 1");
- $this->click("{$base}radio1");
- $this->click("{$base}button1");
+ $this->byId("{$base}radio1")->click();
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{}');
+ $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{}');
- $this->click("{$base}radio2");
- $this->click("{$base}button1");
+ $this->byId("{$base}radio2")->click();
+ $this->byId("{$base}button1")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:radio1 checked:{1} radio2 checked:{1}');
+ $this->assertText("{$base}label1", 'radio1 checked:{1} radio2 checked:{1}');
- $this->click("{$base}bad_radio1");
- $this->click("{$base}button2");
+ $this->byId("{$base}bad_radio1")->click();
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{1} bad_radio2 checked:{}');
+ $this->assertText("{$base}label1", 'bad_radio1 checked:{1} bad_radio2 checked:{}');
- $this->click("{$base}bad_radio2");
- $this->click("{$base}button2");
+ $this->byId("{$base}bad_radio2")->click();
+ $this->byId("{$base}button2")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio1 checked:{} bad_radio2 checked:{1}');
-
- $this->click("{$base}bad_radio3");
- $this->click("{$base}button3");
+ $this->assertText("{$base}label1", 'bad_radio1 checked:{} bad_radio2 checked:{1}');
+
+ $this->byId("{$base}bad_radio3")->click();
+ $this->byId("{$base}button3")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio3 checked:{1} bad_radio4 checked:{}');
+ $this->assertText("{$base}label1", 'bad_radio3 checked:{1} bad_radio4 checked:{}');
- $this->click("{$base}bad_radio4");
- $this->click("{$base}button3");
+ $this->byId("{$base}bad_radio4")->click();
+ $this->byId("{$base}button3")->click();
$this->pause(800);
- $this->assertText("{$base}label1", 'exact:bad_radio3 checked:{} bad_radio4 checked:{1}');
-
+ $this->assertText("{$base}label1", 'bad_radio3 checked:{} bad_radio4 checked:{1}');
+
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
index 14b2f985..27d57a91 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
@@ -1,36 +1,36 @@
<?php
-class Ticket595TestCase extends PradoGenericSeleniumTest
+class Ticket595TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket595');
- $this->assertTitle("Verifying Ticket 595");
-
- $this->click($base.'ctl2');
+ $this->url('tickets/index.php?page=Ticket595');
+ $this->assertEquals($this->title(), "Verifying Ticket 595");
+
+ $this->byId($base.'ctl2')->click();
$this->assertAttribute($base.'A@class','errorclassA');
-
+
$this->type($base.'A', 'Prado');
- $this->click($base.'ctl2');
+ $this->byId($base.'ctl2')->click();
$this->assertAttribute($base.'A@class','errorclassA');
-
+
$this->type($base.'A', 'test@pradosoft.com');
- $this->click($base.'ctl2');
+ $this->byId($base.'ctl2')->click();
$this->pause(800);
$this->assertAttribute($base.'A@class','');
- $this->click($base.'ctl5');
+ $this->byId($base.'ctl5')->click();
$this->pause(800);
- $this->assertAttribute($base.'B@class','exact: errorclassB');
-
+ $this->assertAttribute($base.'B@class',' errorclassB');
+
$this->type($base.'B', 'Prado');
- $this->click($base.'ctl5');
+ $this->byId($base.'ctl5')->click();
$this->pause(800);
- $this->assertAttribute($base.'B@class','exact: errorclassB');
-
+ $this->assertAttribute($base.'B@class',' errorclassB');
+
$this->type($base.'B', 'test@pradosoft.com');
- $this->click($base.'ctl5');
+ $this->byId($base.'ctl5')->click();
$this->pause(800);
$this->assertAttribute($base.'B@class','');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php
index 0d0fe3d2..b51f55d3 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket622TestCase.php
@@ -1,17 +1,18 @@
<?php
-class Ticket622TestCase extends PradoGenericSeleniumTest
+class Ticket622TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket622');
- $this->assertTitle("Verifying Ticket 622");
-
- $this->click($base.'ctl0');
+ $this->url('tickets/index.php?page=Ticket622');
+ $this->assertEquals($this->title(), "Verifying Ticket 622");
+
+ $this->byId($base.'ctl0')->click();
$this->pause(800);
- $this->assertAttribute($base.'ALB@style',';');
- $this->assertAttribute('css=span#acb span@style', ';');
- $this->assertAttribute('css=span#arb span@style', ';');
+
+ $this->assertEquals('', $this->byId($base.'ALB')->attribute('style'));
+ $this->assertEquals('', $this->byCssSelector('span#acb span')->attribute('style'));
+ $this->assertEquals('', $this->byCssSelector('span#arb span')->attribute('style'));
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php
index ec5eceb4..09987387 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket653TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket653TestCase extends PradoGenericSeleniumTest
+class Ticket653TestCase extends PradoGenericSelenium2Test
{
function test()
{
// Open with 'Friendly URL'
- $this->open('tickets/index.php/ticket653');
- $this->verifyTitle("Verifying Ticket 653", "");
+ $this->url('tickets/index.php/ticket653');
+ $this->assertEquals("Verifying Ticket 653", $this->title());
$this->assertText('textspan', 'This is the page for Ticket653');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php
index ff167b0e..174b096b 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket656TestCase.php
@@ -1,24 +1,25 @@
<?php
-class Ticket656TestCase extends PradoGenericSeleniumTest
+class Ticket656TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket656');
- $this->assertTitle("Verifying Ticket 656");
-
+ $this->url('tickets/index.php?page=Ticket656');
+ $this->assertEquals($this->title(), "Verifying Ticket 656");
+
// First test, current date
- $this->click($base."btnUpdate");
+ $this->byId($base."btnUpdate")->click();
$this->pause(800);
$this->assertText($base."lblStatus",date("d-m-Y"));
-
+
// Then, set another date
+ $year=date('Y')-2;
$this->select($base."datePicker_day",20);
$this->select($base."datePicker_month", 10);
- $this->select($base."datePicker_year", 2008);
- $this->click($base."btnUpdate");
+ $this->select($base."datePicker_year", $year);
+ $this->byId($base."btnUpdate")->click();
$this->pause(800);
- $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,2008)));
+ $this->assertText($base."lblStatus",date("d-m-Y", mktime(0,0,0,10,20,$year)));
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php
index 91326e9d..d5d73bc8 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket659TestCase.php
@@ -1,20 +1,20 @@
<?php
-class Ticket659TestCase extends PradoGenericSeleniumTest
+class Ticket659TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
// Normal component (working)
- $this->open('tickets/index.php?page=ToggleTest');
+ $this->url('tickets/index.php?page=ToggleTest');
$this->assertText("${base}lbl", "Down");
- $this->click("${base}btn", "");
+ $this->byId("${base}btn")->click();
$this->pause(800);
$this->assertText("${base}lbl", "Up");
// Extended component (not working)
- $this->open('tickets/index.php?page=Ticket659');
+ $this->url('tickets/index.php?page=Ticket659');
$this->assertText("${base}lbl", "Down");
- $this->click("${base}btn", "");
+ $this->byId("${base}btn")->click();
$this->pause(800);
$this->assertText("${base}lbl", "Up");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php
index e0c97e53..86f03442 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket660TestCase.php
@@ -1,24 +1,24 @@
<?php
-class Ticket660TestCase extends PradoGenericSeleniumTest
+class Ticket660TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket660');
- $this->assertTitle("Verifying Ticket 660");
-
- $this->click($base.'PB');
+ $this->url('tickets/index.php?page=Ticket660');
+ $this->assertEquals($this->title(), "Verifying Ticket 660");
+
+ $this->byId($base.'PB')->click();
$this->pause(800);
$this->assertText($base.'A','ÄÖÜ äöü');
$this->type($base.'T', 'äää');
- $this->click($base.'PB');
+ $this->byId($base.'PB')->click();
$this->pause(800);
$this->assertText($base.'A','äääÄÖÜ äöü');
/*
// CALLBACK CURRENTLY CAN'T WORK ON NON-UTF8 strings
$this->type($base.'T', 'ööö');
- $this->click($base.'CB');
+ $this->byId($base.'CB')->click();
$this->pause(800);
$this->assertText($base.'A','öööÄÖÜ äöü');
*/
diff --git a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
index b6931808..8b5a0166 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php
@@ -1,47 +1,47 @@
<?php
-class Ticket669TestCase extends PradoGenericSeleniumTest
+class Ticket669TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket669');
- $this->assertTitle("Verifying Ticket 669");
-
- $this->assertTextPresent('1 - Test without callback');
- $this->assertValue($base.'tb1', 'exact:ActiveTextBox');
- $this->assertValue($base.'tb2', 'exact:TextBox in ActivePanel');
-
- $this->click($base.'ctl4');
+ $this->url('tickets/index.php?page=Ticket669');
+ $this->assertEquals($this->title(), "Verifying Ticket 669");
+
+ $this->assertContains('1 - Test without callback', $this->source());
+ $this->assertValue($base.'tb1', 'ActiveTextBox');
+ $this->assertValue($base.'tb2', 'TextBox in ActivePanel');
+
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
- $this->assertValue($base.'tb1', 'exact:ActiveTextBox +1');
- $this->assertValue($base.'tb2', 'exact:TextBox in ActivePanel +1');
-
- $this->click($base.'ctl1');
+ $this->assertValue($base.'tb1', 'ActiveTextBox +1');
+ $this->assertValue($base.'tb2', 'TextBox in ActivePanel +1');
+
+ $this->byId($base.'ctl1')->click();
$this->pause(800);
- $this->assertTextPresent('2 - Test callback with 2nd ActivePanel');
- $this->assertValue($base.'tb3', 'exact:ActiveTextBox');
- $this->assertValue($base.'tb4', 'exact:TextBox in ActivePanel');
- $this->assertValue($base.'tb5', 'exact:TextBox in ActivePanel');
-
- $this->click($base.'ctl6');
+ $this->assertContains('2 - Test callback with 2nd ActivePanel', $this->source());
+ $this->assertValue($base.'tb3', 'ActiveTextBox');
+ $this->assertValue($base.'tb4', 'TextBox in ActivePanel');
+ $this->assertValue($base.'tb5', 'TextBox in ActivePanel');
+
+ $this->byId($base.'ctl6')->click();
$this->pause(800);
-
- $this->assertValue($base.'tb3', 'exact:ActiveTextBox +1');
- $this->assertValue($base.'tb4', 'exact:TextBox in ActivePanel +1');
- $this->assertValue($base.'tb5', 'exact:TextBox in ActivePanel +1');
-
- $this->click($base.'ctl2');
+
+ $this->assertValue($base.'tb3', 'ActiveTextBox +1');
+ $this->assertValue($base.'tb4', 'TextBox in ActivePanel +1');
+ $this->assertValue($base.'tb5', 'TextBox in ActivePanel +1');
+
+ $this->byId($base.'ctl2')->click();
$this->pause(800);
- $this->assertTextPresent('3 - Test callback without 2nd ActivePanel');
- $this->assertValue($base.'tb6', 'exact:ActiveTextBox');
- $this->assertValue($base.'tb7', 'exact:TextBox in Panel');
-
- $this->click($base.'ctl8');
+ $this->assertContains('3 - Test callback without 2nd ActivePanel', $this->source());
+ $this->assertValue($base.'tb6', 'ActiveTextBox');
+ $this->assertValue($base.'tb7', 'TextBox in Panel');
+
+ $this->byId($base.'ctl8')->click();
$this->pause(800);
-
- $this->assertValue($base.'tb6', 'exact:ActiveTextBox +1');
- $this->assertValue($base.'tb7', 'exact:TextBox in Panel +1');
-
+
+ $this->assertValue($base.'tb6', 'ActiveTextBox +1');
+ $this->assertValue($base.'tb7', 'TextBox in Panel +1');
+
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php
index 33e45b49..a88b689c 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket670TestCase.php
@@ -1,21 +1,21 @@
<?php
-class Ticket670TestCase extends PradoGenericSeleniumTest
+class Ticket670TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket670');
- $this->assertTitle("Verifying Ticket 670");
-
+ $this->url('tickets/index.php?page=Ticket670');
+ $this->assertEquals($this->title(), "Verifying Ticket 670");
+
$this->type($base."datePicker", '07-07-2003');
$this->pause(800);
//$this->assertText($base."datePicker",'07-07-2003');
- $this->click($base."datePickerbutton");
+ $this->byId($base."datePickerbutton")->click();
$this->pause(800);
- $this->click($base."ok");
+ $this->byId($base."ok")->click();
$this->pause(800);
$this->assertText($base."lbl",'07-07-2007');
-
+
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php
index 031dc991..4e6409af 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket671TestCase.php
@@ -1,41 +1,41 @@
<?php
-class Ticket671TestCase extends PradoGenericSeleniumTest
+class Ticket671TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket671');
- $this->assertTitle("Verifying Ticket 671");
-
- $this->verifyNotVisible($base.'ctl0');
+ $this->url('tickets/index.php?page=Ticket671');
+ $this->assertEquals($this->title(), "Verifying Ticket 671");
+
+ $this->assertNotVisible($base.'ctl0');
// Click submit
- $this->click($base.'ctl1');
+ $this->byId($base.'ctl1')->click();
$this->pause(800);
- $this->verifyText($base.'ctl0', 'Please Select Test 3');
- $this->verifyVisible($base.'ctl0');
+ $this->assertText($base.'ctl0', 'Please Select Test 3');
+ $this->assertVisible($base.'ctl0');
$this->select($base.'addl', 'Test 2');
$this->pause(800);
- $this->verifyVisible($base.'ctl0');
- $this->verifyText($base."lblResult", "You have selected 'Test 2'. But this is not valid !");
+ $this->assertVisible($base.'ctl0');
+ $this->assertText($base."lblResult", "You have selected 'Test 2'. But this is not valid !");
$this->select($base.'addl', 'Test 3');
$this->pause(800);
- $this->verifyNotVisible($base.'ctl0');
- $this->verifyText($base."lblResult", "You have selected 'Test 3'.");
- $this->click($base.'ctl1');
+ $this->assertNotVisible($base.'ctl0');
+ $this->assertText($base."lblResult", "You have selected 'Test 3'.");
+ $this->byId($base.'ctl1')->click();
$this->pause(800);
- $this->verifyText($base."lblResult", "You have successfully validated the form");
-
+ $this->assertText($base."lblResult", "You have successfully validated the form");
+
$this->type($base.'testTextBox', 'test');
$this->pause(800);
- $this->click($base.'ctl3');
+ $this->byId($base.'ctl3')->click();
$this->pause(800);
- $this->verifyVisible($base.'ctl2');
+ $this->assertVisible($base.'ctl2');
$this->type($base.'testTextBox',"Prado");
$this->pause(800);
- $this->click($base.'ctl3');
+ $this->byId($base.'ctl3')->click();
$this->pause(800);
- $this->verifyNotVisible($base.'ctl2');
- $this->verifyText($base.'lblResult2', 'Thanks !');
+ $this->assertNotVisible($base.'ctl2');
+ $this->assertText($base.'lblResult2', 'Thanks !');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php
index 7ba24dcc..a3394bca 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket671_reopenedTestCase.php
@@ -1,46 +1,46 @@
<?php
-class Ticket671_reopenedTestCase extends PradoGenericSeleniumTest
+class Ticket671_reopenedTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket671_reopened');
- $this->assertTitle("Verifying Ticket 671_reopened");
+ $this->url('tickets/index.php?page=Ticket671_reopened');
+ $this->assertEquals($this->title(), "Verifying Ticket 671_reopened");
// Type wrong value
$this->type($base.'testField', 'abcd');
- $this->click($base.'ctl4');
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
$this->assertVisible($base.'ctl2');
- $this->assertText($base.'Result', 'exact:Check callback called (1) --- Save callback called DATA NOK');
-
+ $this->assertText($base.'Result', 'Check callback called (1) --- Save callback called DATA NOK');
+
// Reclick, should not have any callback
- $this->click($base.'ctl4');
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
$this->assertVisible($base.'ctl2');
- $this->assertText($base.'Result', 'exact:Check callback called (2) --- Save callback called DATA NOK');
-
+ $this->assertText($base.'Result', 'Check callback called (2) --- Save callback called DATA NOK');
+
// Type right value
$this->type($base.'testField', 'Test');
- $this->click($base.'ctl4');
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
$this->assertNotVisible($base.'ctl2');
- $this->assertText($base.'Result', 'exact:Check callback called (3) --- Save callback called DATA OK');
-
+ $this->assertText($base.'Result', 'Check callback called (3) --- Save callback called DATA OK');
+
// Type empty value
$this->type($base.'testField', '');
- $this->click($base.'ctl4');
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
$this->assertVisible($base.'ctl1');
$this->assertNotVisible($base.'ctl2');
- $this->assertText($base.'Result', 'exact:Check callback called (3) --- Save callback called DATA OK');
-
+ $this->assertText($base.'Result', 'Check callback called (3) --- Save callback called DATA OK');
+
// Type right value
$this->type($base.'testField', 'Test');
- $this->click($base.'ctl4');
+ $this->byId($base.'ctl4')->click();
$this->pause(800);
$this->assertNotVisible($base.'ctl1');
$this->assertNotVisible($base.'ctl2');
- $this->assertText($base.'Result', 'exact:Check callback called (4) --- Save callback called DATA OK');
+ $this->assertText($base.'Result', 'Check callback called (4) --- Save callback called DATA OK');
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php
index 4ee22c20..2891a386 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php
@@ -1,35 +1,35 @@
<?php
-class Ticket679TestCase extends PradoGenericSeleniumTest
+class Ticket679TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket679');
- $this->assertTitle("Verifying Ticket 679");
-
+ $this->url('tickets/index.php?page=Ticket679');
+ $this->assertEquals($this->title(), "Verifying Ticket 679");
+
// First part of ticket : Repeater bug
- $this->click($base."ctl0");
+ $this->byId($base."ctl0")->click();
$this->pause(800);
$this->assertText($base."myLabel",'outside');
- $this->verifyVisible($base."myLabel");
-
+ $this->assertVisible($base."myLabel");
+
// Reload completly the page
$this->refresh();
$this->pause(800);
- $this->click($base."Repeater_ctl0_ctl0");
+ $this->byId($base."Repeater_ctl0_ctl0")->click();
$this->pause(800);
$this->assertText($base."myLabel",'inside');
- $this->verifyVisible($base."myLabel");
-
+ $this->assertVisible($base."myLabel");
+
// Second part of ticket : ARB bug
- $this->verifyNotChecked($base."myRadioButton");
- $this->click($base."ctl1");
+ $this->assertFalse($this->byId("{$base}myRadioButton")->selected());
+ $this->byId($base."ctl1")->click();
$this->pause(800);
- $this->verifyChecked($base."myRadioButton");
- $this->click($base."ctl2");
+ $this->assertTrue($this->byId("{$base}myRadioButton")->selected());
+ $this->byId($base."ctl2")->click();
$this->pause(800);
- $this->verifyNotChecked($base."myRadioButton");
+ $this->assertFalse($this->byId("{$base}myRadioButton")->selected());
$this->pause(800);
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php
index a441f82c..d014f2f4 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php
@@ -1,16 +1,16 @@
<?php
-class Ticket691TestCase extends PradoGenericSeleniumTest
+class Ticket691TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket691');
- $this->assertTitle("Verifying Ticket 691");
-
- $this->click($base."List_c2");
+ $this->url('tickets/index.php?page=Ticket691');
+ $this->assertEquals($this->title(), "Verifying Ticket 691");
+
+ $this->byXPath("//input[@id='{$base}List_c2']/../..")->click();
$this->pause(800);
- $this->assertText($base."Title", "Thanks");
- $this->assertText($base."Result", "You vote 3");
+ $this->assertText("{$base}Title", "Thanks");
+ $this->assertText("{$base}Result", "You vote 3");
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php
index 8f58a320..8aa9cb4e 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket698TestCase.php
@@ -1,17 +1,17 @@
<?php
-class Ticket698TestCase extends PradoGenericSeleniumTest
+class Ticket698TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket698');
- $this->assertTitle("Verifying Ticket 698");
-
- $this->click($base."switchContentTypeButton");
+ $this->url('tickets/index.php?page=Ticket698');
+ $this->assertEquals($this->title(), "Verifying Ticket 698");
+
+ $this->byId($base."switchContentTypeButton")->click();
$this->pause(800);
$this->assertVisible($base."EditHtmlTextBox");
$this->pause(800);
- $this->click($base."switchContentTypeButton");
+ $this->byId($base."switchContentTypeButton")->click();
$this->pause(1000);
$this->assertNotVisible($base."EditHtmlTextBox");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
index 0366c2fc..d10529ce 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket700TestCase.php
@@ -1,71 +1,71 @@
<?php
-class Ticket700TestCase extends PradoGenericSeleniumTest
+class Ticket700TestCase extends PradoGenericSelenium2Test
{
function test()
{
// page: Home
- $this->open('tickets/index700.php');
- $this->clickAndWait('ctl0_Logout');
- $this->clickAndWait('pageHome');
- $this->assertTitle("Home");
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at root|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: default 4|');
- $this->assertTextPresent('|Param5: Set at root|');
+ $this->url('tickets/index700.php');
+ $this->byId('ctl0_Logout')->click();
+ $this->byId('pageHome')->click();
+ $this->assertEquals($this->title(), "Home");
+ $this->assertContains('|Param1: Set at app config|', $this->source());
+ $this->assertContains('|Param2: Set at root|', $this->source());
+ $this->assertContains('|Param3: default 3|', $this->source());
+ $this->assertContains('|Param4: default 4|', $this->source());
+ $this->assertContains('|Param5: Set at root|', $this->source());
// page: admin.Home
- $this->clickAndWait('pageAdminHome');
- $this->assertTitle('UserLogin');
+ $this->byId('pageAdminHome')->click();
+ $this->assertEquals($this->title(), 'UserLogin');
$this->type('ctl0_Main_Username','AdminUser');
$this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminHome');
- $this->assertTitle('admin.Home');
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at admin|');
- $this->assertTextPresent('|Param3: Set at admin|');
- $this->assertTextPresent('|Param4: Set at app config|');
- $this->assertTextPresent('|Param5: Set at app config|');
+ $this->byId('ctl0_Main_LoginButton')->click();
+ $this->byId('pageAdminHome')->click();
+ $this->assertEquals($this->title(), 'admin.Home');
+ $this->assertContains('|Param1: Set at app config|', $this->source());
+ $this->assertContains('|Param2: Set at admin|', $this->source());
+ $this->assertContains('|Param3: Set at admin|', $this->source());
+ $this->assertContains('|Param4: Set at app config|', $this->source());
+ $this->assertContains('|Param5: Set at app config|', $this->source());
// page: admin.Home2
- $this->clickAndWait('pageAdminHome2');
- $this->assertTitle('admin.Home2');
- $this->clickAndWait('ctl0_Logout');
- $this->clickAndWait('pageAdminHome2');
- $this->assertTitle('admin.Home2');
+ $this->byId('pageAdminHome2')->click();
+ $this->assertEquals($this->title(), 'admin.Home2');
+ $this->byId('ctl0_Logout')->click();
+ $this->byId('pageAdminHome2')->click();
+ $this->assertEquals($this->title(), 'admin.Home2');
// page: admin.users.Home
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('UserLogin');
+ $this->byId('pageAdminUsersHome')->click();
+ $this->assertEquals($this->title(), 'UserLogin');
$this->type('ctl0_Main_Username','NormalUser');
$this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('UserLogin');
+ $this->byId('ctl0_Main_LoginButton')->click();
+ $this->byId('pageAdminUsersHome')->click();
+ $this->assertEquals($this->title(), 'UserLogin');
$this->type('ctl0_Main_Username','AdminUser');
$this->type('ctl0_Main_Password','demo');
- $this->clickAndWait('ctl0_Main_LoginButton');
- $this->clickAndWait('pageAdminUsersHome');
- $this->assertTitle('admin.users.Home');
- $this->assertTextPresent('|Param1: Set at admin|');
- $this->assertTextPresent('|Param2: Set at admin.users|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: Set at admin|');
- $this->assertTextPresent('|Param5: Set at app config|');
+ $this->byId('ctl0_Main_LoginButton')->click();
+ $this->byId('pageAdminUsersHome')->click();
+ $this->assertEquals($this->title(), 'admin.users.Home');
+ $this->assertContains('|Param1: Set at admin|', $this->source());
+ $this->assertContains('|Param2: Set at admin.users|', $this->source());
+ $this->assertContains('|Param3: default 3|', $this->source());
+ $this->assertContains('|Param4: Set at admin|', $this->source());
+ $this->assertContains('|Param5: Set at app config|', $this->source());
// page: admin.users.Home2
- $this->clickAndWait('pageAdminUsersHome2');
- $this->assertTitle('admin.users.Home2');
+ $this->byId('pageAdminUsersHome2')->click();
+ $this->assertEquals($this->title(), 'admin.users.Home2');
// page: content.Home
- $this->clickAndWait('pageContentHome');
- $this->assertTitle('content.Home');
- $this->assertTextPresent('|Param1: Set at app config|');
- $this->assertTextPresent('|Param2: Set at root|');
- $this->assertTextPresent('|Param3: default 3|');
- $this->assertTextPresent('|Param4: default 4|');
- $this->assertTextPresent('|Param5: Set at app config|');
- $this->clickAndWait('ctl0_Logout');
+ $this->byId('pageContentHome')->click();
+ $this->assertEquals($this->title(), 'content.Home');
+ $this->assertContains('|Param1: Set at app config|', $this->source());
+ $this->assertContains('|Param2: Set at root|', $this->source());
+ $this->assertContains('|Param3: default 3|', $this->source());
+ $this->assertContains('|Param4: default 4|', $this->source());
+ $this->assertContains('|Param5: Set at app config|', $this->source());
+ $this->byId('ctl0_Logout')->click();
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php
index dedb491f..46c240b1 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket703TestCase.php
@@ -1,25 +1,26 @@
<?php
-class Ticket703TestCase extends PradoGenericSeleniumTest
+class Ticket703TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket703.Ticket703');
- $this->assertTitle("Verifying Ticket703.Ticket703 703.703");
+ $this->url('tickets/index.php?page=Ticket703.Ticket703');
+ $this->assertEquals($this->title(), "Verifying Ticket703.Ticket703 703.703");
// Start with an empty log
- $this->click($base.'ctl2');
+ $this->byId($base.'ctl2')->click();
// Wait for callback to be lanched
$this->pause(1000);
$this->assertText($base.'logBox', "");
$this->type($base.'logMessage', "Test of prado logging system");
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->pause(800);
- $this->click($base.'ctl1');
- $this->assertTextPresent($base.'logBox', "Test of prado logging system");
+ $this->byId($base.'ctl1')->click();
+ $this->pause(1000);
+ $this->assertContains("Test of prado logging system", $this->byId($base.'logBox')->value());
// Clean log for next run
- $this->click($base.'ctl2');
+ $this->byId($base.'ctl2')->click();
// Wait for callback to be lanched
$this->pause(1000);
$this->assertText($base.'logBox', "");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php
index 87509b29..ab8780f6 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket708TestCase.php
@@ -1,25 +1,25 @@
<?php
-class Ticket708TestCase extends PradoGenericSeleniumTest
+class Ticket708TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket708');
- $this->assertTitle("Verifying Ticket 708");
-
- $this->click($base."grid_ctl1_RadioButton");
+ $this->url('tickets/index.php?page=Ticket708');
+ $this->assertEquals($this->title(), "Verifying Ticket 708");
+
+ $this->byId($base."grid_ctl1_RadioButton")->click();
$this->pause(800);
$this->assertText($base."Result", "You have selected Radio Button #1");
-
- $this->click($base."grid_ctl2_RadioButton");
+
+ $this->byId($base."grid_ctl2_RadioButton")->click();
$this->pause(800);
$this->assertText($base."Result", "You have selected Radio Button #2");
-
- $this->click($base."grid_ctl3_RadioButton");
+
+ $this->byId($base."grid_ctl3_RadioButton")->click();
$this->pause(800);
$this->assertText($base."Result", "You have selected Radio Button #3");
-
- $this->click($base."grid_ctl4_RadioButton");
+
+ $this->byId($base."grid_ctl4_RadioButton")->click();
$this->pause(800);
$this->assertText($base."Result", "You have selected Radio Button #4");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
index c71cb0a8..46346ca1 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
@@ -1,42 +1,45 @@
<?php
-class Ticket719TestCase extends PradoGenericSeleniumTest
+class Ticket719TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("tickets/index.php?page=Ticket719");
- $this->verifyTextPresent("Verifying Ticket 719");
+ $this->url("tickets/index.php?page=Ticket719");
+ $this->assertContains("Verifying Ticket 719", $this->source());
$base="ctl0_Content_";
- $this->click("${base}ctl2");
+ $this->byId("${base}ctl2")->click();
$this->pause(800);
$this->assertVisible("${base}ctl0", 'Required');
$this->assertVisible("${base}ctl1", 'Required');
- $this->type("${base}autocomplete", 'f');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->byId("${base}autocomplete")->click();
+
+ $this->keys('f');
$this->pause(500);
- $this->verifyTextPresent('Finland');
+ $this->assertContains('Finland', $this->source());
- $this->type("${base}autocomplete", 'fr');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->keys('r');
$this->pause(500);
- $this->verifyTextPresent('French');
+ $this->assertContains('French', $this->source());
- $this->type("${base}autocomplete", 'fra');
- $this->runScript("Prado.Registry.get('${base}autocomplete').onKeyPress({})");
+ $this->keys('a');
$this->pause(500);
- $this->verifyTextPresent('France');
+ $this->assertContains('France', $this->source());
- $this->click("css=#${base}autocomplete_result ul li");
+ $this->byCssSelector("#${base}autocomplete_result ul li")->click();
$this->pause(800);
$this->assertNotVisible("${base}ctl1");
- $this->type("${base}textbox", "Prado");
+ $this->byId("${base}textbox")->clear();
+ $this->byId("${base}textbox")->value('Prado');
+ // trigger onblur() event
+ $this->byCssSelector('body')->click();
+
$this->assertNotVisible("${base}ctl0");
- $this->click("${base}ctl2");
+ $this->byId("${base}ctl2")->click();
$this->pause(800);
$this->assertText("${base}Result", "TextBox Content : Prado -- Autocomplete Content :France");
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php
index 90711162..dfa93089 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket722TestCase.php
@@ -1,28 +1,32 @@
<?php
-class Ticket722TestCase extends PradoGenericSeleniumTest
+class Ticket722TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket722');
- $this->assertTitle("Verifying Ticket 722");
-
- $this->assertText($base.'InPlaceTextBox__label', 'Editable Text');
- $this->click($base.'InPlaceTextBox__label');
+ $this->url('tickets/index.php?page=Ticket722');
+ $this->assertEquals($this->title(), "Verifying Ticket 722");
+
+ $label = $this->byID("{$base}InPlaceTextBox__label");
+ $this->assertEquals('Editable Text', $label->text());
+ $label->click();
$this->pause(800);
- $this->assertVisible($base.'InPlaceTextBox');
+
+ $textbox = $this->byID("{$base}InPlaceTextBox");
+ $this->assertTrue($textbox->displayed());
+
$this->type($base.'InPlaceTextBox',"Prado");
- $this->fireEvent($base.'InPlaceTextBox', 'blur'); // Release textbox
$this->pause(800);
- $this->assertNotVisible($base.'InPlaceTextBox');
- $this->assertText($base.'InPlaceTextBox__label', 'Prado');
- $this->click($base.'ctl0');
+ $this->assertFalse($textbox->displayed());
+ $this->assertEquals('Prado', $label->text());
+
+ $this->byId("{$base}ctl0")->click();
$this->pause(800);
- $this->assertText($base.'InPlaceTextBox__label', 'exact:Prado [Read Only]');
- $this->click($base.'InPlaceTextBox__label');
+ $this->assertEquals('Prado [Read Only]', $label->text());
+
+ $label->click();
$this->pause(800);
- $this->assertNotVisible($base.'InPlaceTextBox');
-
+ $this->assertFalse($textbox->displayed());
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
index 111b7583..91fc9420 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket72TestCase.php
@@ -1,14 +1,14 @@
<?php
-class Ticket72TestCase extends PradoGenericSeleniumTest
+class Ticket72TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket72');
+ $this->url('tickets/index.php?page=Ticket72');
$this->type("ctl0\$Content\$K1", "abc");
$this->type("ctl0\$Content\$K2", "efg");
- $this->clickAndWait("//input[@type='submit' and @value='Send']", "");
- $this->verifyTextPresent("efg", "");
- $this->verifyTextNotPresent("abcefg", "");
+ $this->byXPath("//input[@type='submit' and @value='Send']")->click();
+ $this->assertContains("efg", $this->source());
+ $this->assertNotContains("abcefg", $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
index f822e37f..690df8a1 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket745TestCase.php
@@ -1,17 +1,16 @@
<?php
-class Ticket745TestCase extends PradoGenericSeleniumTest
+class Ticket745TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket745');
- $this->assertTitle("Verifying Ticket 745");
-
+ $this->url('tickets/index.php?page=Ticket745');
+ $this->assertEquals($this->title(), "Verifying Ticket 745");
+
$this->select($base.'Wizard1_DropDownList1', 'Green');
- $this->click($base.'Wizard1_ctl4_ctl1');
+ $this->byId($base.'Wizard1_ctl4_ctl1')->click();
$this->pause(800);
- $this->assertTextPresent ('Step 3 of 3');
-
+ $this->assertContains('Step 3 of 3', $this->source());
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
index 468342a5..6968a1d5 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
@@ -1,36 +1,35 @@
<?php
-class Ticket769TestCase extends PradoGenericSeleniumTest
+class Ticket769TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base="ctl0_Content_";
- $this->open('tickets/index.php?page=Ticket769');
- $this->assertTitle("Verifying Ticket 769");
+ $this->url('tickets/index.php?page=Ticket769');
+ $this->assertEquals($this->title(), "Verifying Ticket 769");
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->assertVisible($base.'ctl1');
$this->type($base.'T1', 'Prado');
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->pause(800);
$this->assertNotVisible($base.'ctl1');
- $this->verifyTextPresent($base.'ctl0', 'T1 clicked' );
+ $this->assertValue($base.'ctl0', 'T1 clicked' );
- $this->click($base.'ctl2');
+ $this->byId($base.'ctl2')->click();
$this->pause(800);
- $this->verifyTextPresent($base.'B', 'This is B');
- $this->click($base.'ctl3');
+ $this->assertText($base.'B', 'This is B');
+ $this->byId($base.'ctl3')->click();
$this->pause(800);
$this->type($base.'T1', '');
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->assertVisible($base.'ctl1');
$this->type($base.'T1', 'Prado');
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->pause(800);
$this->assertNotVisible($base.'ctl1');
- $this->verifyTextPresent($base.'ctl0', 'T1 clicked clicked' );
-
+ $this->assertValue($base.'ctl0', 'T1 clicked clicked' );
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php
index 229a68eb..c20f29a3 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket785TestCase.php
@@ -1,33 +1,33 @@
<?php
-class Ticket785TestCase extends PradoGenericSeleniumTest
+class Ticket785TestCase extends PradoGenericSelenium2Test
{
function test()
{
$year=date('Y')-1;
$base = 'ctl0_Content_';
- $this->open('tickets/index.php?page=Ticket785');
- $this->assertTitle("Verifying Ticket 785");
-
+ $this->url('tickets/index.php?page=Ticket785');
+ $this->assertEquals($this->title(), "Verifying Ticket 785");
+
$this->assertText('selDate', '');
$this->select($base."datePicker_year", $year);
$this->pause(800);
$expectedDate=date("d-m").'-'.$year;
$this->assertText('selDate', $expectedDate);
-
- $this->click($base."datePickerbutton");
+
+ $this->byId($base."datePickerbutton")->click();
$this->pause(800);
- $this->click("css=input.todayButton");
+ $this->byCssSelector("input.todayButton")->click();
$this->pause(800);
- $this->clickAt("css=body","0,0"); // Hide calendar
+ $this->byCssSelector("body")->click(); // Hide calendar
$expectedDate=date("d-m-Y");
$this->assertText('selDate', $expectedDate);
-
+
$this->assertText('selDate2', '');
$this->type($base.'datePicker2', '12/05/2006');
$this->pause(800);
- $this->clickAt("css=body","0,0");
- $this->assertText('selDate2', '12/05/2006');
-
+ $this->byCssSelector("body")->click();
+ $this->assertText('selDate2', '12/05/2006');
+
}
} \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php
index 11e363ba..163eb541 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php
@@ -1,12 +1,12 @@
<?php
-class Ticket823TestCase extends PradoGenericSeleniumTest {
+class Ticket823TestCase extends PradoGenericSelenium2Test {
public function test() {
- $this->open('tickets/index.php?page=Ticket823');
- $this->assertTitle("Verifying Ticket 823");
+ $this->url('tickets/index.php?page=Ticket823');
+ $this->assertEquals($this->title(), "Verifying Ticket 823");
$base = 'ctl0_Content_';
- $this->assertElementPresent('xpath=//option[@value="Choose..."]');
+ $this->assertElementPresent('//option[@value="Choose..."]');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php
index bbe185ad..9a44a5ec 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket828TestCase.php
@@ -1,34 +1,34 @@
<?php
-class Ticket828TestCase extends PradoGenericSeleniumTest
+class Ticket828TestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("tickets/index.php?page=Ticket828");
- $this->click("{$base}submit1");
+ $this->url("tickets/index.php?page=Ticket828");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
- $this->click("{$base}list1_c0");
- $this->addSelection("{$base}list2", "label=One");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c0")->click();
+ $this->addSelection("{$base}list2", "One");
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list1_c1");
- $this->click("{$base}list1_c2");
- $this->click("{$base}list1_c3");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list1_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c1")->click();
+ $this->byId("{$base}list1_c2")->click();
+ $this->byId("{$base}list1_c3")->click();
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list1_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->pause(200);
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php
index fef9ac31..e354b126 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket849TestCase.php
@@ -1,15 +1,15 @@
<?php
-class Ticket849TestCase extends PradoGenericSeleniumTest
+class Ticket849TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket849');
- $this->assertTitle("Verifying Ticket 849");
+ $this->url('tickets/index.php?page=Ticket849');
+ $this->assertEquals($this->title(), "Verifying Ticket 849");
$base='ctl0_Content_';
- $this->click($base.'ctl0');
+ $this->byId($base.'ctl0')->click();
$this->pause(800);
- $this->click('css=td.date.today.selected');
+ $this->byCssSelector('td.date.today.selected')->click();
$this->pause(1000);
$this->assertValue($base.'ctl0', date('m-d-Y'));
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
index 8006dd09..361235fc 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket876TestCase.php
@@ -1,22 +1,22 @@
<?php
-class Ticket876TestCase extends PradoGenericSeleniumTest {
+class Ticket876TestCase extends PradoGenericSelenium2Test {
public function test() {
- $this->open('tickets/index.php?page=Ticket876');
- $this->assertTitle("Verifying Ticket 876");
+ $this->url('tickets/index.php?page=Ticket876');
+ $this->assertEquals($this->title(), "Verifying Ticket 876");
$base = 'ctl0_Content_';
-
- $this->assertElementPresent('xpath=//link[@rel="stylesheet"]');
- $this->clickAndWait($base.'Button');
- $this->assertElementNotPresent('xpath=//link[@rel="stylesheet"]');
-
+
+ $this->assertElementPresent('//link[@rel="stylesheet"]');
+ $this->byId($base.'Button')->click();
+ $this->assertElementNotPresent('//link[@rel="stylesheet"]');
+
/*$this->select($base.'Date_month', 10);
$this->select($base.'Date_day', 22);
-
- $this->clickAndWait($base.'SendButton');
- $this->assertTextPresent('2008-10-22');*/
+
+ $this->byId($base.'SendButton')->click();
+ $this->assertContains('2008-10-22', $this->source());*/
}
-
+
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
index 99990ebf..7f9c23f3 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket886TestCase.php
@@ -1,14 +1,14 @@
<?php
-class Ticket886TestCase extends PradoGenericSeleniumTest
+class Ticket886TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket886');
- $this->assertTitle("Verifying Ticket 886");
+ $this->url('tickets/index.php?page=Ticket886');
+ $this->assertEquals($this->title(), "Verifying Ticket 886");
$base = 'ctl0_Content_';
- $this->clickAndWait($base.'SendButton');
- $this->assertTextPresent(date('Y').'-01-01');
+ $this->byId($base.'SendButton')->click();
+ $this->assertContains(date('Y').'-01-01', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
index 67d1f1f2..e3bac037 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket897TestCase.php
@@ -1,18 +1,18 @@
<?php
-class Ticket897TestCase extends PradoGenericSeleniumTest
+class Ticket897TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket897');
- $this->assertTitle("Verifying Ticket 897");
+ $this->url('tickets/index.php?page=Ticket897');
+ $this->assertEquals($this->title(), "Verifying Ticket 897");
$base = 'ctl0_Content_';
-
+
$this->select($base.'Date_month', 10);
$this->select($base.'Date_day', 22);
-
- $this->clickAndWait($base.'SendButton');
- $this->assertTextPresent(date('Y').'-10-22');
+
+ $this->byId($base.'SendButton')->click();
+ $this->assertContains(date('Y').'-10-22', $this->source());
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
index 3ec69873..fc0bcc01 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
@@ -1,17 +1,17 @@
<?php
-class Ticket900TestCase extends PradoGenericSeleniumTest
+class Ticket900TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket900');
- $this->assertTitle("Verifying Ticket 900");
+ $this->url('tickets/index.php?page=Ticket900');
+ $this->assertEquals($this->title(), "Verifying Ticket 900");
$base = 'ctl0_Content_';
-
- $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl3');
+
+ $this->byName('ctl0$Content$DataGrid$ctl1$ctl3')->click();
$this->type($base.'DataGrid_ctl1_TextBox', '');
- $this->click($base.'DataGrid_ctl1_ctl3');
- $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl4');
+ $this->byId($base.'DataGrid_ctl1_ctl3')->click();
+ $this->byName('ctl0$Content$DataGrid$ctl1$ctl4')->click();
$this->assertText($base.'CommandName', 'cancel');
}
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
index 208bd1d0..f03f980e 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
@@ -1,15 +1,15 @@
<?php
-class Ticket922TestCase extends PradoGenericSeleniumTest
+class Ticket922TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket922');
- $this->assertTitle("Verifying Ticket 922");
+ $this->url('tickets/index.php?page=Ticket922');
+ $this->assertEquals($this->title(), "Verifying Ticket 922");
$base = 'ctl0_Content_';
-
+
$this->type($base.'Text', 'two words');
- $this->clickAndWait('ctl0$Content$ctl0');
+ $this->byName('ctl0$Content$ctl0')->click();
$this->assertText($base.'Result','two words');
}
diff --git a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php
index a56925a8..538860d4 100755
--- a/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket93TestCase.php
@@ -4,12 +4,12 @@
*
*/
-class Ticket93TestCase extends PradoGenericSeleniumTest
+class Ticket93TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('tickets/index.php?page=Ticket93');
- $this->verifyTextPresent("ValidationGroups without any inputs with grouping");
+ $this->url('tickets/index.php?page=Ticket93');
+ $this->assertContains("ValidationGroups without any inputs with grouping", $this->source());
}
-
+
}
diff --git a/tests/FunctionalTests/validators/protected/pages/Layout.tpl b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
index 25dbea09..47591ef3 100755
--- a/tests/FunctionalTests/validators/protected/pages/Layout.tpl
+++ b/tests/FunctionalTests/validators/protected/pages/Layout.tpl
@@ -33,7 +33,6 @@
<com:TForm>
<com:TContentPlaceHolder ID="Content" />
<hr style="margin-top: 2em" />
-<com:TJavascriptLogger />
</com:TForm>
</body>
</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/protected/pages/ListControl.page b/tests/FunctionalTests/validators/protected/pages/ListControl.page
index 1429e184..a75dc3ff 100755
--- a/tests/FunctionalTests/validators/protected/pages/ListControl.page
+++ b/tests/FunctionalTests/validators/protected/pages/ListControl.page
@@ -1,58 +1,58 @@
<com:TContent ID="Content">
- <h1>List Control Required Field Validation Test</h1>
+ <h1>List Control Required Field Validation Test</h1>
<com:TCheckBoxList ID="list1">
<com:TListItem Text="Select a color below" Value="" />
<com:TListItem Text="Red" />
<com:TListItem Text="Blue" />
<com:TListItem Text="Green" />
</com:TCheckBoxList>
-
+
<com:TRequiredFieldValidator ID="validator1"
ControlToValidate="list1"
InitialValue="Select a color below"
ErrorMessage="*" />
-
+
<hr />
-
+
<com:TDropDownList ID="list2">
<com:TListItem Text="--- Select a color ---" />
<com:TListItem Text="Red" />
<com:TListItem Text="Blue" />
<com:TListItem Text="Green" />
</com:TDropDownList>
-
+
<com:TRequiredFieldValidator ID="validator2"
ControlToValidate="list2"
InitialValue="--- Select a color ---"
ErrorMessage="*" />
-
+
<hr />
-
+
<com:TListBox ID="list3">
- <com:TListItem Text="Don't select this one" />
+ <com:TListItem Text="Dont select this one" />
<com:TListItem Text="Red" />
<com:TListItem Text="Blue" />
<com:TListItem Text="Green" />
</com:TListBox>
-
+
<com:TRequiredFieldValidator ID="validator3"
ControlToValidate="list3"
- InitialValue="Don't select this one"
+ InitialValue="Dont select this one"
ErrorMessage="*" />
-
+
<hr />
-
+
<com:TRadioButtonList ID="list4">
<com:TListItem Text="Select something else" />
<com:TListItem Text="Red" />
<com:TListItem Text="Blue" />
<com:TListItem Text="Green" />
</com:TRadioButtonList>
-
+
<com:TRequiredFieldValidator ID="validator4"
ControlToValidate="list4"
InitialValue="Select something else"
ErrorMessage="*" />
-
+
<com:TButton ID="submit1" Text="Submit!" />
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/tests/ButtonTestCase.php b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
index 58001322..90265156 100755
--- a/tests/FunctionalTests/validators/tests/ButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ButtonTestCase.php
@@ -1,63 +1,63 @@
<?php
-class ButtonTestCase extends PradoGenericSeleniumTest
+class ButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('validators/index.php?page=Button');
+ $this->url('validators/index.php?page=Button');
// verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
index 847cbc9a..8e6e1583 100755
--- a/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CheckBoxTestCase.php
@@ -1,65 +1,65 @@
<?php
-class CheckBoxTestCase extends PradoGenericSeleniumTest
+class CheckBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('validators/index.php?page=CheckBox');
+ $this->url('validators/index.php?page=CheckBox');
// verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
index 187351c1..bdc2e4a9 100755
--- a/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
@@ -1,42 +1,42 @@
<?php
//New Test
-class CompareValidatorTestCase extends PradoGenericSeleniumTest
+class CompareValidatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
-
- $this->open("validators/index.php?page=CompareValidator", "");
- $this->verifyTextPresent("Prado CompareValidator Tests", "");
+
+ $this->url("validators/index.php?page=CompareValidator");
+ $this->assertContains("Prado CompareValidator Tests", $this->source());
$this->type("{$base}text1", "qwe");
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
-
- $this->click("//input[@type='submit' and @value='Test']", "");
+
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->type("{$base}text2", "1234");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator1");
$this->type("{$base}text2", "qwe");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
-
+
$this->type("{$base}text3", "12312");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator2");
-
+
$this->type("{$base}text3", "13/1/2005");
$this->assertVisible("{$base}validator2");
-
+
$this->type("{$base}text3", "12/1/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
-
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
index 02b174ef..32e79a90 100755
--- a/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ConditionalValidationTestCase.php
@@ -1,52 +1,52 @@
<?php
-class ConditionalValidationTestCase extends PradoGenericSeleniumTest
+class ConditionalValidationTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=ConditionalValidation", "");
- $this->verifyTextPresent("Conditional Validation (clientside + server side)", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->url("validators/index.php?page=ConditionalValidation");
+ $this->assertContains("Conditional Validation (clientside + server side)", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1", "testing");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1" ,"");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "test");
$this->type("{$base}text2", "123");
- $this->clickAndWait("{$base}submit1");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
- $this->click("{$base}check1");
+ $this->byId("{$base}check1")->click();
$this->type("{$base}text1", "");
$this->type("{$base}text2", "");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
}
diff --git a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
index 106f7a00..ca48a453 100755
--- a/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/CustomValidatorTestCase.php
@@ -1,18 +1,18 @@
<?php
//New Test
-class CustomValidatorTestCase extends PradoGenericSeleniumTest
+class CustomValidatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=CustomValidator", "");
- $this->assertTextPresent("Prado CustomValidator Tests", "");
+ $this->url("validators/index.php?page=CustomValidator");
+ $this->assertContains("Prado CustomValidator Tests", $this->source());
$this->assertNotVisible("{$base}validator1");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertVisible("{$base}validator1");
-
+
$this->type("{$base}text1", "Prado");
$this->pause(250);
$this->assertNotVisible("{$base}validator1");
@@ -22,7 +22,7 @@ class CustomValidatorTestCase extends PradoGenericSeleniumTest
$this->type("{$base}text1", "Prado");
$this->pause(250);
$this->assertNotVisible("{$base}validator1");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->assertNotVisible("{$base}validator1");
}
diff --git a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
index 7ec220f0..cad00f1f 100755
--- a/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
@@ -3,16 +3,15 @@
* Created on 25/04/2006
*/
-class DataTypeValidatorTestCase extends PradoGenericSeleniumTest
+class DataTypeValidatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->setSpeed(500);
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=DataTypeValidator", "");
- $this->verifyTextPresent("Data Type Validator Tests", "");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
+ $this->url("validators/index.php?page=DataTypeValidator");
+ $this->assertContains("Data Type Validator Tests", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
@@ -20,31 +19,30 @@ class DataTypeValidatorTestCase extends PradoGenericSeleniumTest
$this->type("{$base}textbox1", "a");
$this->type("{$base}textbox2", "b");
$this->type("{$base}textbox3", "c");
- $this->click("//input[@type='submit' and @value='submit!']", "");
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
-
+
$this->type("{$base}textbox1", "12");
$this->type("{$base}textbox2", "12.5");
$this->type("{$base}textbox3", "2/10/2005");
- $this->clickAndWait("//input[@type='submit' and @value='submit!']", "");
-
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
-
+
$this->type("{$base}textbox1", "12.2");
$this->type("{$base}textbox2", "-12.5");
$this->type("{$base}textbox3", "2/13/2005");
- $this->click("//input[@type='submit' and @value='submit!']", "");
-
+ $this->byXPath("//input[@type='submit' and @value='submit!']")->click();
+
$this->assertVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
- $this->setSpeed(0);
}
-
-}
+
+}
diff --git a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
index e7425a33..ab68a619 100755
--- a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
@@ -1,70 +1,68 @@
<?php
-class DatePickerTestCase extends PradoGenericSeleniumTest
+class DatePickerTestCase extends PradoGenericSelenium2Test
{
function test()
{
$year=2012;
$year2=2013;
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=DatePicker", "");
- $this->verifyTextPresent("Date Picker validation Test", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
+ $this->url("validators/index.php?page=DatePicker");
+ $this->assertContains("Date Picker validation Test", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertNotVisible("{$base}validator8");
- $this->click("{$base}submit1");
- $this->assertVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byId("{$base}submit1")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
//the range validator is visible because the date is a drop down list
//thus has default value != ""
- $this->assertVisible("{$base}validator4", "");
- $this->assertVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
+ $this->assertVisible("{$base}validator4");
+ $this->assertVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertVisible("{$base}validator8");
- $this->click("{$base}submit1");
- $this->pause(250);
$this->type("{$base}picker1", "13/4/$year");
- $this->select("{$base}picker2_month", "label=9");
- $this->select("{$base}picker2_day", "label=10");
- $this->select("{$base}picker2_year", "label=$year");
+ $this->select("{$base}picker2_month", "9");
+ $this->select("{$base}picker2_day", "10");
+ $this->select("{$base}picker2_year", "$year");
$this->pause(250);
$this->type("{$base}picker3", "14/4/$year");
$this->pause(250);
$this->type("{$base}picker4", "7/4/$year");
- $this->select("{$base}picker5_day", "label=6");
- $this->select("{$base}picker5_month", "label=3");
- $this->select("{$base}picker5_year", "label=$year2");
- $this->select("{$base}picker6_month", "label=3");
- $this->select("{$base}picker6_year", "label=$year2");
- $this->select("{$base}picker6_day", "label=5");
-
- $this->click("{$base}submit1");
+ $this->select("{$base}picker5_day", "6");
+ $this->select("{$base}picker5_month", "3");
+ $this->select("{$base}picker5_year", "$year2");
+ $this->select("{$base}picker6_month", "3");
+ $this->select("{$base}picker6_year", "$year2");
+ $this->select("{$base}picker6_day", "5");
+ $this->byId("{$base}submit1")->click();
+ $this->pause(500);
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertVisible("{$base}validator6", "");
- $this->assertVisible("{$base}validator8", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertVisible("{$base}validator6");
+ $this->assertVisible("{$base}validator8");
$this->type("{$base}picker1", "20/4/$year2");
$this->type("{$base}picker4", "29/4/$year");
- $this->select("{$base}picker6_day", "label=10");
+ $this->select("{$base}picker6_day", "10");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->assertNotVisible("{$base}validator4", "");
- $this->assertNotVisible("{$base}validator5", "");
- $this->assertNotVisible("{$base}validator6", "");
- $this->assertNotVisible("{$base}validator8", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->assertNotVisible("{$base}validator4");
+ $this->assertNotVisible("{$base}validator5");
+ $this->assertNotVisible("{$base}validator6");
+ $this->assertNotVisible("{$base}validator8");
}
}
diff --git a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
index e6b5d6d8..800e36ff 100755
--- a/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ImageButtonTestCase.php
@@ -1,63 +1,63 @@
<?php
-class ImageButtonTestCase extends PradoGenericSeleniumTest
+class ImageButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('validators/index.php?page=ImageButton');
+ $this->url('validators/index.php?page=ImageButton');
// verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
index b523452c..394556e9 100755
--- a/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
+++ b/tests/FunctionalTests/validators/tests/LinkButtonTestCase.php
@@ -1,62 +1,62 @@
<?php
-class LinkButtonTestCase extends PradoGenericSeleniumTest
+class LinkButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open('validators/index.php?page=LinkButton');
+ $this->url('validators/index.php?page=LinkButton');
// verify all error messages are invisible
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validator shows the error
- $this->click("ctl0_Content_ctl1");
- $this->verifyVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the first validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button1 is clicked');
+ $this->assertNotContains('Button1 is clicked', $this->source());
$this->type("ctl0_Content_TextBox1", "test");
- $this->clickAndWait("ctl0_Content_ctl1");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button1 is clicked and valid');
+ $this->byId("ctl0_Content_ctl1")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button1 is clicked and valid', $this->source());
// verify the second validator shows the error
- $this->click("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
// verify the second validation is passed
$this->pause(500);
- $this->verifyTextNotPresent('Button2 is clicked');
+ $this->assertNotContains('Button2 is clicked', $this->source());
$this->type("ctl0_Content_TextBox2", "test");
- $this->clickAndWait("ctl0_Content_ctl3");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button2 is clicked and valid');
+ $this->byId("ctl0_Content_ctl3")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button2 is clicked and valid', $this->source());
// verify the third validator shows the error
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyVisible('ctl0_Content_ctl4');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertVisible('ctl0_Content_ctl4');
// verify the third validation is passed
- $this->verifyTextPresent('Button3 is clicked');
- $this->verifyTextNotPresent('Button3 is clicked and valid');
+ $this->assertContains('Button3 is clicked', $this->source());
+ $this->assertNotContains('Button3 is clicked and valid', $this->source());
$this->type("ctl0_Content_TextBox3", "test");
- $this->clickAndWait("ctl0_Content_ctl5");
- $this->verifyNotVisible('ctl0_Content_ctl0');
- $this->verifyNotVisible('ctl0_Content_ctl2');
- $this->verifyNotVisible('ctl0_Content_ctl4');
- $this->verifyTextPresent('Button3 is clicked and valid');
+ $this->byId("ctl0_Content_ctl5")->click();
+ $this->assertNotVisible('ctl0_Content_ctl0');
+ $this->assertNotVisible('ctl0_Content_ctl2');
+ $this->assertNotVisible('ctl0_Content_ctl4');
+ $this->assertContains('Button3 is clicked and valid', $this->source());
}
}
diff --git a/tests/FunctionalTests/validators/tests/ListControlTestCase.php b/tests/FunctionalTests/validators/tests/ListControlTestCase.php
index 68feee84..55e370c5 100755
--- a/tests/FunctionalTests/validators/tests/ListControlTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ListControlTestCase.php
@@ -3,38 +3,39 @@
* Created on 24/04/2006
*/
-class ListControlTestCase extends PradoGenericSeleniumTest
+class ListControlTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=ListControl", "");
- $this->verifyTextPresent("List Control Required Field Validation Test", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
+ $this->url("validators/index.php?page=ListControl");
+ $this->assertContains("List Control Required Field Validation Test", $this->source());
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
$this->assertVisible("{$base}validator4");
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->select("{$base}list2", "label=Red");
- $this->select("{$base}list3", "label=Blue");
- $this->click("{$base}list4_c3", "");
- $this->clickAndWait("//input[@type='submit' and @value='Submit!']", "");
+ $this->byXPath("//input[@id='{$base}list1_c1' and @value='Red']")->click();
+ $this->select("{$base}list2", "Red");
+ $this->select("{$base}list3", "Blue");
+ $this->byId("{$base}list4_c3")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
$this->assertNotVisible("{$base}validator4");
- $this->select("{$base}list3", "label=Don't select this one");
- $this->click("{$base}list4_c0");
- $this->select("{$base}list2", "label=--- Select a color ---");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
- $this->click("//input[@id='{$base}list1_c1' and @value='Red']", "");
- $this->click("//input[@id='{$base}list1_c0' and @value='Select a color below']", "");
- $this->click("//input[@type='submit' and @value='Submit!']", "");
+ //invalid selector: Unable to locate an element with the xpath expression .//option[.='Don\'t select this one'] because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string './/option[.='Don\'t select this one']' is not a valid XPath expression.
+ $this->select("{$base}list3", "Dont select this one");
+ $this->byId("{$base}list4_c0")->click();
+ $this->select("{$base}list2", "--- Select a color ---");
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
+ $this->byXPath("//input[@id='{$base}list1_c1' and @value='Red']")->click();
+ $this->byXPath("//input[@id='{$base}list1_c0' and @value='Select a color below']")->click();
+ $this->byXPath("//input[@type='submit' and @value='Submit!']")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
index 022ee7f6..485c6a24 100755
--- a/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RangeValidatorTestCase.php
@@ -1,166 +1,166 @@
<?php
//New Test
-class RangeValidatorTestCase extends PradoGenericSeleniumTest
+class RangeValidatorTestCase extends PradoGenericSelenium2Test
{
function testIntegerRange()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorInteger", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Integer", "");
-
+ $this->url("validators/index.php?page=RangeValidatorInteger");
+ $this->assertContains("Prado RangeValidator Tests Integer", $this->source());
+
//between 1 and 4
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+
+
// >= 2
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 20
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
-
+
function testFloatRange()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorFloat", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Float", "");
-
+ $this->url("validators/index.php?page=RangeValidatorFloat");
+ $this->assertContains("Prado RangeValidator Tests Float", $this->source());
+
//between 1 and 4
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "2");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+
+
// >= 2
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 20
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "100");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "10");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
}
-
+
function testDateRange()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorDate", "");
- $this->verifyTextPresent("Prado RangeValidator Tests Date", "");
-
+ $this->url("validators/index.php?page=RangeValidatorDate");
+ $this->assertContains("Prado RangeValidator Tests Date", $this->source());
+
//between 22/1/2005 and 3/2/2005
$this->type("{$base}text1", "ad");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "27/2/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+
+
// >= 22/1/2005
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "1/1/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->pause(250);
- $this->assertVisible("{$base}validator2", "");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "1/4/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 3/2/2005
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "4/5/2005");
- $this->click("//input[@type='submit' and @value='Test']", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
$this->pause(250);
- $this->assertVisible("{$base}validator3", "");
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "1/2/2005");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
- }
-
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
+ }
+
function testStringRange()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RangeValidatorString", "");
- $this->verifyTextPresent("Prado RangeValidator Tests String", "");
-
+ $this->url("validators/index.php?page=RangeValidatorString");
+ $this->assertContains("Prado RangeValidator Tests String", $this->source());
+
//between 'd' and 'y'
$this->type("{$base}text1", "a");
- $this->assertNotVisible("{$base}validator1", "");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "b");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "f");
- $this->assertNotVisible("{$base}validator1", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
-
-
+ $this->assertNotVisible("{$base}validator1");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+
+
// >= 'd'
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text2", "a");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "g");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator2");
// <= 'y'
- $this->assertNotVisible("{$base}validator3", "");
+ $this->assertNotVisible("{$base}validator3");
$this->type("{$base}text3", "z");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator3", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator3");
$this->type("{$base}text3", "t");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator3", "");
- }
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator3");
+ }
}
diff --git a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
index f269bf3b..ffa30126 100755
--- a/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
@@ -1,32 +1,32 @@
<?php
//New Test
-class RegExpValidatorTestCase extends PradoGenericSeleniumTest
+class RegExpValidatorTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RegularExpressionValidator", "");
- $this->verifyTextPresent("Prado RegularExpressionValidator Tests", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->url("validators/index.php?page=RegularExpressionValidator");
+ $this->assertContains("Prado RegularExpressionValidator Tests", $this->source());
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1", "1");
$this->type("{$base}text2", "2");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "asdasd");
- $this->click("//input[@type='submit' and @value='Test']", "");
- $this->assertVisible("{$base}validator1", "");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertVisible("{$base}validator1");
$this->type("{$base}text1", "12345");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertVisible("{$base}validator2");
$this->type("{$base}text2", "wei@gmail.com");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Test']", "");
- $this->assertNotVisible("{$base}validator1", "");
- $this->assertNotVisible("{$base}validator2", "");
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
+ $this->byXPath("//input[@type='submit' and @value='Test']")->click();
+ $this->assertNotVisible("{$base}validator1");
+ $this->assertNotVisible("{$base}validator2");
}
}
diff --git a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
index f8b54eb0..249f5ae8 100755
--- a/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php
@@ -1,54 +1,54 @@
<?php
-class RequiredFieldTestCase extends PradoGenericSeleniumTest
+class RequiredFieldTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("RequiredFieldValidator Tests");
+ $this->url("validators/index.php?page=RequiredFieldValidator");
+ $this->assertContains("RequiredFieldValidator Tests", $this->source());
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->type("{$base}text1", "testing");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
- $this->click("{$base}submit2");
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
$this->assertVisible("{$base}validator4");
$this->type("{$base}text2", "testing2");
- $this->click("{$base}submit2");
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}submit3");
+ $this->byId("{$base}submit3")->click();
$this->assertVisible("{$base}summary3");
- $this->clickAndWait("{$base}submit4");
+ $this->byId("{$base}submit4")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
$this->assertNotVisible("{$base}validator4");
- $this->click("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator2");
- $this->click("{$base}check1");
- $this->click("{$base}submit2");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit2")->click();
$this->assertVisible("{$base}validator4");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->type("{$base}text1");
- $this->click("{$base}check1");
- $this->click("{$base}submit1");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
- $this->click("{$base}check2");
- $this->clickAndWait("{$base}submit2");
+ $this->byId("{$base}check2")->click();
+ $this->byId("{$base}submit2")->click();
$this->type("{$base}text1", "Hello");
- $this->click("{$base}check1");
- $this->click("{$base}submit2");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}submit2")->click();
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
@@ -56,14 +56,14 @@ class RequiredFieldTestCase extends PradoGenericSeleniumTest
$this->assertNotVisible("{$base}validator8");
$this->type("{$base}text1");
$this->type("{$base}text2");
- $this->click("{$base}check1");
- $this->click("{$base}check2");
- $this->click("{$base}submit3");
+ $this->byId("{$base}check1")->click();
+ $this->byId("{$base}check2")->click();
+ $this->byId("{$base}submit3")->click();
$this->assertVisible("{$base}validator5");
$this->assertVisible("{$base}validator6");
$this->assertVisible("{$base}validator7");
$this->assertVisible("{$base}validator8");
- $this->clickAndWait("{$base}submit4");
+ $this->byId("{$base}submit4")->click();
$this->assertNotVisible("{$base}validator5");
$this->assertNotVisible("{$base}validator6");
$this->assertNotVisible("{$base}validator7");
@@ -73,10 +73,10 @@ class RequiredFieldTestCase extends PradoGenericSeleniumTest
function testInitialValue()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredFieldValidator");
- $this->assertTextPresent("InitialValue Test");
+ $this->url("validators/index.php?page=RequiredFieldValidator");
+ $this->assertContains("InitialValue Test", $this->source());
$this->assertNotVisible("{$base}validator9");
- $this->click("{$base}submit5");
+ $this->byId("{$base}submit5")->click();
$this->pause(250);
$this->assertVisible("{$base}validator9");
$this->type("{$base}text5", "adasd");
diff --git a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
index 2662c721..0de6815e 100755
--- a/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
+++ b/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
@@ -1,35 +1,35 @@
<?php
-class RequiredListTestCase extends PradoGenericSeleniumTest
+class RequiredListTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
- $this->open("validators/index.php?page=RequiredListValidator");
- $this->click("{$base}submit1");
+ $this->url("validators/index.php?page=RequiredListValidator");
+ $this->byId("{$base}submit1")->click();
$this->assertVisible("{$base}validator1");
$this->assertVisible("{$base}validator2");
$this->assertVisible("{$base}validator3");
- $this->click("{$base}list1_c0");
- $this->addSelection("{$base}list2", "label=One");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c0")->click();
+ $this->addSelection("{$base}list2", "One");
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list1_c1");
- $this->click("{$base}list1_c2");
- $this->click("{$base}list1_c3");
- $this->addSelection("{$base}list2", "label=Two");
- $this->click("{$base}list1_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list1_c1")->click();
+ $this->byId("{$base}list1_c2")->click();
+ $this->byId("{$base}list1_c3")->click();
+ $this->addSelection("{$base}list2", "Two");
+ $this->byId("{$base}list1_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
$this->assertNotVisible("{$base}validator3");
- $this->click("{$base}list3_c3");
- $this->clickAndWait("{$base}submit1");
+ $this->byId("{$base}list3_c3")->click();
+ $this->byId("{$base}submit1")->click();
$this->pause(200);
$this->assertNotVisible("{$base}validator1");
$this->assertNotVisible("{$base}validator2");
diff --git a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
index 7dc1d6b1..d4c44a34 100755
--- a/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
+++ b/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
@@ -1,46 +1,46 @@
<?php
//New Test
-class ValidationSummaryTestCase extends PradoGenericSeleniumTest
+class ValidationSummaryTestCase extends PradoGenericSelenium2Test
{
function test()
{
$base = "ctl0_Content_";
-
- $this->open("validators/index.php?page=ValidationSummary", "");
- $this->verifyTextPresent("Validation Summary Test", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
-
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
+
+ $this->url("validators/index.php?page=ValidationSummary");
+ $this->assertContains("Validation Summary Test", $this->source());
+ //$this->assertText("{$base}summary1", "");
+ //$this->assertText("{$base}summary2", "");
+
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->assertVisible("{$base}summary1");
$this->assertNotVisible("{$base}summary2");
- $this->click("//input[@type='submit' and @value='Sign In']", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
$this->assertNotVisible("{$base}summary1");
- $this->assertVisible("{$base}summary2");
-
+ $this->assertVisible("{$base}summary2");
+
$this->type("{$base}Username", "qwe");
$this->type("{$base}Password", "ewwq");
- $this->click("//input[@type='submit' and @value='Sign In']", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
$this->assertNotVisible("{$base}summary1");
- $this->assertVisible("{$base}summary2");
-
- /*$this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
+ $this->assertVisible("{$base}summary2");
+
+ /*$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->type("{$base}UserID", "123");
$this->type("{$base}Pass", "123");
- $this->clickAndWait("//input[@type='submit' and @value='Sign In']", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
- $this->clickAndWait("//input[@type='submit' and @value='Create New Account']", "");
- //$this->verifyText("{$base}summary1", "");
- //$this->verifyText("{$base}summary2", "");
+ $this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
+ //$this->assertText("{$base}summary1", "");
+ //$this->assertText("{$base}summary2", "");
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
+ //$this->assertText("{$base}summary1", "");
+ //$this->assertText("{$base}summary2", "");
$this->type("{$base}Password", "");
- $this->click("//input[@type='submit' and @value='Create New Account']", "");
+ $this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
$this->assertVisible("{$base}summary1");
$this->assertNotVisible("{$base}summary2");
-
+
$this->type("{$base}Password", "12312");
$this->assertVisible("{$base}summary1");
*/