From 61bb16ee2e5f0a66234e1575242169a10fde47b5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 7 Jul 2006 14:54:15 +0000 Subject: Merge from 3.0 branch till 1253. --- .gitattributes | 171 +- HISTORY | 3 + buildscripts/texbuilder/pages.php | 1 + .../protected/pages/Advanced/Scripts3.page | 3 + .../protected/pages/Controls/ClientScript.page | 52 + .../protected/pages/Controls/Standard.page | 4 + framework/Web/Javascripts/js/validator.js | 8 +- framework/Web/Javascripts/prado/validation3.js | 15 + framework/Web/UI/WebControls/TClientScript.php | 128 +- framework/Web/UI/WebControls/TDataList.php | 4 +- framework/Web/UI/WebControls/TRadioButton.php | 79 + .../Web/UI/WebControls/TRequiredFieldValidator.php | 49 +- framework/Web/UI/WebControls/TStyleSheet.php | 7 +- framework/prado-cli.php | 94 +- tests/FunctionalTests/PradoTester.php | 54 - tests/FunctionalTests/README.txt | 532 ----- tests/FunctionalTests/config.php | 159 -- tests/FunctionalTests/features.php | 4 +- .../features/protected/pages/ClientScripTest.page | 30 - .../features/protected/pages/CompositeControl.page | 12 - .../features/protected/pages/DatePicker.page | 61 - .../features/protected/pages/HtmlArea.page | 25 - .../features/protected/pages/ValidatorEffects.page | 9 + .../features/protected/pages/test.js | 4 - .../features/tests/CompositeControlTestCase.php | 23 - tests/FunctionalTests/quickstart.php | 4 +- .../selenium/core/SeleneseRunner.html | 111 - .../FunctionalTests/selenium/core/SeleniumLog.html | 79 - .../FunctionalTests/selenium/core/TestPrompt.html | 93 - .../selenium/core/TestRunner-splash.html | 55 - .../FunctionalTests/selenium/core/TestRunner.html | 157 -- .../selenium/core/domviewer/butmin.gif | Bin 843 -> 0 bytes .../selenium/core/domviewer/butplus.gif | Bin 848 -> 0 bytes .../selenium/core/domviewer/domviewer.css | 298 --- .../selenium/core/domviewer/domviewer.html | 16 - .../selenium/core/domviewer/selenium-domviewer.js | 205 -- .../selenium/core/scripts/find_matching_child.js | 69 - .../selenium/core/scripts/htmlutils.js | 463 ----- .../selenium/core/scripts/prototype-1.4.0.js | 1781 ---------------- .../selenium/core/scripts/selenium-api.js | 1402 ------------- .../selenium/core/scripts/selenium-browserbot.js | 1114 ---------- .../core/scripts/selenium-browserdetect.js | 115 -- .../core/scripts/selenium-commandhandlers.js | 371 ---- .../core/scripts/selenium-executionloop.js | 266 --- .../selenium/core/scripts/selenium-logging.js | 112 - .../core/scripts/selenium-seleneserunner.js | 300 --- .../selenium/core/scripts/selenium-testrunner.js | 748 ------- .../selenium/core/scripts/selenium-version.js | 5 - .../core/scripts/user-extensions.js.sample | 75 - .../selenium/core/scripts/xmlextras.js | 153 -- .../selenium/core/selenium-logo.png | Bin 6714 -> 0 bytes tests/FunctionalTests/selenium/core/selenium.css | 211 -- tests/FunctionalTests/selenium/core/xpath/dom.js | 428 ---- tests/FunctionalTests/selenium/core/xpath/misc.js | 255 --- tests/FunctionalTests/selenium/core/xpath/xpath.js | 2182 -------------------- tests/FunctionalTests/selenium/php/TestRunner.php | 170 -- tests/FunctionalTests/selenium/php/results.php | 160 -- tests/FunctionalTests/selenium/php/selenium.php | 486 ----- .../selenium/prado-functional-test.js | 247 --- tests/FunctionalTests/tickets.php | 4 +- .../tickets/protected/pages/Ticket220.page | 30 + .../tickets/protected/pages/Ticket225.page | 14 + .../tickets/protected/pages/Ticket225.php | 19 + .../tickets/protected/pages/test.js | 4 + .../tickets/tests/Ticket220TestCase.php | 18 + .../tickets/tests/Ticket225TestCase.php | 24 + tests/FunctionalTests/validators.php | 4 +- tests/UnitTests/TODO.txt | 5 - tests/UnitTests/framework/Collections/utList.php | 236 --- tests/UnitTests/framework/Collections/utMap.php | 160 -- tests/UnitTests/framework/Data/CacheTestCase.php | 98 - tests/UnitTests/framework/Data/test.db | Bin 4096 -> 0 bytes tests/UnitTests/framework/Data/utAPCCache.php | 45 - .../framework/Data/utDateTimeSimpleFormatter.php | 81 - tests/UnitTests/framework/Data/utMemCache.php | 66 - tests/UnitTests/framework/Data/utSqliteCache.php | 59 - tests/UnitTests/framework/Data/utXmlDocument.php | 82 - tests/UnitTests/framework/Data/xml/data1.xml | 45 - tests/UnitTests/framework/Data/xml/data1.xml.out | 41 - tests/UnitTests/framework/Data/xml/data2.xml | 41 - tests/UnitTests/framework/Data/xml/data2.xml.out | 40 - tests/UnitTests/framework/Data/xml/data3.xml | 46 - tests/UnitTests/framework/Data/xml/data3.xml.out | 45 - .../framework/I18N/TestOfDateTimeFormatInfo.php | 223 -- .../UnitTests/framework/I18N/messages/en/tests.mo | Bin 403 -> 0 bytes .../UnitTests/framework/I18N/messages/en/tests.po | 18 - .../UnitTests/framework/I18N/messages/en/tests.xml | 17 - .../framework/I18N/messages/en_AU/tests.mo | Bin 371 -> 0 bytes .../framework/I18N/messages/en_AU/tests.mo.bak | Bin 371 -> 0 bytes .../framework/I18N/messages/en_AU/tests.po | 15 - .../framework/I18N/messages/en_AU/tests.po.bak | 15 - .../framework/I18N/messages/en_AU/tests.xml | 13 - .../framework/I18N/messages/en_AU/tests.xml.bak | 13 - .../UnitTests/framework/I18N/messages/messages.db | Bin 8192 -> 0 bytes .../framework/I18N/messages/messages.db.bak | Bin 8192 -> 0 bytes .../framework/I18N/messages/messages.en.mo | Bin 373 -> 0 bytes .../framework/I18N/messages/messages.en.po | 15 - .../framework/I18N/messages/messages.en.xml | 19 - .../framework/I18N/messages/messages.en_AU.mo | Bin 414 -> 0 bytes .../framework/I18N/messages/messages.en_AU.mo.bak | Bin 414 -> 0 bytes .../framework/I18N/messages/messages.en_AU.po | 18 - .../framework/I18N/messages/messages.en_AU.po.bak | 18 - .../framework/I18N/messages/messages.en_AU.xml | 17 - .../framework/I18N/messages/messages.en_AU.xml.bak | 17 - .../UnitTests/framework/I18N/messages/messages.mo | Bin 409 -> 0 bytes .../UnitTests/framework/I18N/messages/messages.po | 18 - .../UnitTests/framework/I18N/messages/messages.xml | 23 - .../framework/I18N/messages/messages_mysql.sql | 69 - .../framework/I18N/messages/tests.en_AU.po | 7 - tests/UnitTests/framework/I18N/messages/tests.mo | Bin 404 -> 0 bytes tests/UnitTests/framework/I18N/messages/tests.po | 18 - tests/UnitTests/framework/I18N/messages/tests.xml | 17 - .../UnitTests/framework/I18N/testChoiceFormat.php | 34 - tests/UnitTests/framework/I18N/testCultureInfo.php | 94 - tests/UnitTests/framework/I18N/testDateFormat.php | 99 - .../UnitTests/framework/I18N/testMessageFormat.php | 13 - .../framework/I18N/testMessageFormat_SQLite.php | 142 -- .../framework/I18N/testMessageFormat_XLIFF.php | 174 -- .../framework/I18N/testMessageFormat_gettext.php | 176 -- .../UnitTests/framework/I18N/testNumberFormat.php | 113 - .../framework/I18N/testNumberFormatInfo.php | 105 - tests/UnitTests/framework/I18N/tmp/cache.txt | 0 .../framework/TestSystem/protected/application.xml | 21 - .../framework/TestSystem/protected/data/test.db | Bin 5120 -> 0 bytes .../TestSystem/protected/pages/config.xml | 12 - tests/UnitTests/framework/Web/UI/utControl.php | 416 ---- .../framework/Web/UI/utJavascriptSerializer.php | 181 -- tests/UnitTests/framework/Web/utHttpRequest.php | 268 --- tests/UnitTests/framework/common.php | 99 - tests/UnitTests/framework/index.php | 103 - tests/UnitTests/framework/utApplication.php | 25 - tests/UnitTests/framework/utComponent.php | 329 --- tests/UnitTests/framework/utPradoBase.php | 110 - tests/UnitTests/simpletest/CHANGELOG | 6 - .../simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE | 201 -- .../simpletest/HtmlReporterWithCoverage.php | 268 --- tests/UnitTests/simpletest/LICENSE | 49 - tests/UnitTests/simpletest/README | 110 - tests/UnitTests/simpletest/VERSION | 1 - tests/UnitTests/simpletest/authentication.php | 219 -- tests/UnitTests/simpletest/browser.php | 1016 --------- .../docs/en/authentication_documentation.html | 320 --- .../simpletest/docs/en/browser_documentation.html | 386 ---- tests/UnitTests/simpletest/docs/en/docs.css | 84 - .../docs/en/expectation_documentation.html | 356 ---- .../docs/en/form_testing_documentation.html | 277 --- .../docs/en/group_test_documentation.html | 357 ---- tests/UnitTests/simpletest/docs/en/index.html | 467 ----- .../docs/en/mock_objects_documentation.html | 713 ------- tests/UnitTests/simpletest/docs/en/overview.html | 422 ---- .../docs/en/partial_mocks_documentation.html | 426 ---- .../simpletest/docs/en/reporter_documentation.html | 515 ----- .../docs/en/server_stubs_documentation.html | 388 ---- .../docs/en/unit_test_documentation.html | 387 ---- .../docs/en/web_tester_documentation.html | 508 ----- .../docs/fr/authentication_documentation.html | 264 --- .../simpletest/docs/fr/browser_documentation.html | 329 --- tests/UnitTests/simpletest/docs/fr/docs.css | 84 - .../docs/fr/expectation_documentation.html | 263 --- .../docs/fr/form_testing_documentation.html | 235 --- .../docs/fr/group_test_documentation.html | 288 --- tests/UnitTests/simpletest/docs/fr/index.html | 343 --- .../docs/fr/mock_objects_documentation.html | 492 ----- tests/UnitTests/simpletest/docs/fr/overview.html | 294 --- .../docs/fr/partial_mocks_documentation.html | 333 --- .../simpletest/docs/fr/reporter_documentation.html | 386 ---- .../docs/fr/server_stubs_documentation.html | 279 --- .../docs/fr/unit_test_documentation.html | 306 --- .../docs/fr/web_tester_documentation.html | 397 ---- tests/UnitTests/simpletest/dumper.php | 380 ---- tests/UnitTests/simpletest/encoding.php | 156 -- tests/UnitTests/simpletest/errors.php | 141 -- tests/UnitTests/simpletest/expectation.php | 568 ----- .../simpletest/extensions/pear_test_case.php | 199 -- .../simpletest/extensions/phpunit_test_case.php | 108 - tests/UnitTests/simpletest/form.php | 619 ------ tests/UnitTests/simpletest/frames.php | 673 ------ tests/UnitTests/simpletest/http.php | 853 -------- tests/UnitTests/simpletest/mock_objects.php | 1323 ------------ tests/UnitTests/simpletest/mytests/log_test.php | 18 - tests/UnitTests/simpletest/options.php | 366 ---- tests/UnitTests/simpletest/page.php | 961 --------- tests/UnitTests/simpletest/parser.php | 750 ------- tests/UnitTests/simpletest/remote.php | 115 -- tests/UnitTests/simpletest/reporter.php | 241 --- tests/UnitTests/simpletest/runner.php | 300 --- tests/UnitTests/simpletest/scorer.php | 378 ---- tests/UnitTests/simpletest/shell_tester.php | 271 --- tests/UnitTests/simpletest/simple_test.php | 553 ----- tests/UnitTests/simpletest/socket.php | 216 -- tests/UnitTests/simpletest/tag.php | 1241 ----------- tests/UnitTests/simpletest/unit_tester.php | 303 --- tests/UnitTests/simpletest/url.php | 508 ----- tests/UnitTests/simpletest/user_agent.php | 490 ----- tests/UnitTests/simpletest/web_tester.php | 1330 ------------ tests/UnitTests/simpletest/xml.php | 615 ------ tests/test_tools/README.txt | 532 +++++ tests/test_tools/functional_tests.php | 66 + tests/test_tools/selenium/core/SeleniumLog.html | 78 + .../selenium/core/TestRunner-splash.html | 52 + .../selenium/core/scripts/find_matching_child.js | 69 + .../test_tools/selenium/core/scripts/htmlutils.js | 463 +++++ .../selenium/core/scripts/prototype-1.4.0.js | 1781 ++++++++++++++++ .../selenium/core/scripts/selenium-api.js | 1402 +++++++++++++ .../selenium/core/scripts/selenium-browserbot.js | 1114 ++++++++++ .../core/scripts/selenium-browserdetect.js | 115 ++ .../core/scripts/selenium-commandhandlers.js | 371 ++++ .../core/scripts/selenium-executionloop.js | 266 +++ .../selenium/core/scripts/selenium-logging.js | 112 + .../core/scripts/selenium-seleneserunner.js | 300 +++ .../selenium/core/scripts/selenium-testrunner.js | 748 +++++++ .../selenium/core/scripts/selenium-version.js | 5 + .../core/scripts/user-extensions.js.sample | 75 + .../test_tools/selenium/core/scripts/xmlextras.js | 153 ++ tests/test_tools/selenium/core/selenium.css | 211 ++ tests/test_tools/selenium/core/xpath/dom.js | 428 ++++ tests/test_tools/selenium/core/xpath/misc.js | 255 +++ tests/test_tools/selenium/core/xpath/xpath.js | 2182 ++++++++++++++++++++ tests/test_tools/selenium/php/TestRunner.php | 169 ++ tests/test_tools/selenium/php/results.php | 160 ++ tests/test_tools/selenium/php/selenium.php | 477 +++++ tests/test_tools/selenium/prado-functional-test.js | 247 +++ tests/test_tools/simpletest/CHANGELOG | 6 + .../simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE | 201 ++ .../simpletest/HtmlReporterWithCoverage.php | 268 +++ tests/test_tools/simpletest/LICENSE | 49 + tests/test_tools/simpletest/README | 110 + tests/test_tools/simpletest/VERSION | 1 + tests/test_tools/simpletest/authentication.php | 219 ++ tests/test_tools/simpletest/browser.php | 1016 +++++++++ .../docs/en/authentication_documentation.html | 320 +++ .../simpletest/docs/en/browser_documentation.html | 386 ++++ tests/test_tools/simpletest/docs/en/docs.css | 84 + .../docs/en/expectation_documentation.html | 356 ++++ .../docs/en/form_testing_documentation.html | 277 +++ .../docs/en/group_test_documentation.html | 357 ++++ tests/test_tools/simpletest/docs/en/index.html | 467 +++++ .../docs/en/mock_objects_documentation.html | 713 +++++++ tests/test_tools/simpletest/docs/en/overview.html | 422 ++++ .../docs/en/partial_mocks_documentation.html | 426 ++++ .../simpletest/docs/en/reporter_documentation.html | 515 +++++ .../docs/en/server_stubs_documentation.html | 388 ++++ .../docs/en/unit_test_documentation.html | 387 ++++ .../docs/en/web_tester_documentation.html | 508 +++++ .../docs/fr/authentication_documentation.html | 264 +++ .../simpletest/docs/fr/browser_documentation.html | 329 +++ tests/test_tools/simpletest/docs/fr/docs.css | 84 + .../docs/fr/expectation_documentation.html | 263 +++ .../docs/fr/form_testing_documentation.html | 235 +++ .../docs/fr/group_test_documentation.html | 288 +++ tests/test_tools/simpletest/docs/fr/index.html | 343 +++ .../docs/fr/mock_objects_documentation.html | 492 +++++ tests/test_tools/simpletest/docs/fr/overview.html | 294 +++ .../docs/fr/partial_mocks_documentation.html | 333 +++ .../simpletest/docs/fr/reporter_documentation.html | 386 ++++ .../docs/fr/server_stubs_documentation.html | 279 +++ .../docs/fr/unit_test_documentation.html | 306 +++ .../docs/fr/web_tester_documentation.html | 397 ++++ tests/test_tools/simpletest/dumper.php | 380 ++++ tests/test_tools/simpletest/encoding.php | 156 ++ tests/test_tools/simpletest/errors.php | 141 ++ tests/test_tools/simpletest/expectation.php | 568 +++++ .../simpletest/extensions/pear_test_case.php | 199 ++ .../simpletest/extensions/phpunit_test_case.php | 108 + tests/test_tools/simpletest/form.php | 619 ++++++ tests/test_tools/simpletest/frames.php | 673 ++++++ tests/test_tools/simpletest/http.php | 853 ++++++++ tests/test_tools/simpletest/mock_objects.php | 1323 ++++++++++++ tests/test_tools/simpletest/options.php | 366 ++++ tests/test_tools/simpletest/page.php | 961 +++++++++ tests/test_tools/simpletest/parser.php | 750 +++++++ tests/test_tools/simpletest/remote.php | 115 ++ tests/test_tools/simpletest/reporter.php | 241 +++ tests/test_tools/simpletest/runner.php | 300 +++ tests/test_tools/simpletest/scorer.php | 378 ++++ tests/test_tools/simpletest/shell_tester.php | 271 +++ tests/test_tools/simpletest/simple_test.php | 553 +++++ tests/test_tools/simpletest/socket.php | 216 ++ tests/test_tools/simpletest/tag.php | 1241 +++++++++++ tests/test_tools/simpletest/unit_tester.php | 303 +++ tests/test_tools/simpletest/url.php | 508 +++++ tests/test_tools/simpletest/user_agent.php | 490 +++++ tests/test_tools/simpletest/web_tester.php | 1330 ++++++++++++ tests/test_tools/simpletest/xml.php | 615 ++++++ tests/test_tools/unit_tests.php | 134 ++ 285 files changed, 37842 insertions(+), 42948 deletions(-) create mode 100644 demos/quickstart/protected/pages/Controls/ClientScript.page delete mode 100644 tests/FunctionalTests/PradoTester.php delete mode 100644 tests/FunctionalTests/README.txt delete mode 100644 tests/FunctionalTests/config.php delete mode 100644 tests/FunctionalTests/features/protected/pages/ClientScripTest.page delete mode 100644 tests/FunctionalTests/features/protected/pages/CompositeControl.page delete mode 100644 tests/FunctionalTests/features/protected/pages/DatePicker.page delete mode 100644 tests/FunctionalTests/features/protected/pages/HtmlArea.page delete mode 100644 tests/FunctionalTests/features/protected/pages/test.js delete mode 100644 tests/FunctionalTests/features/tests/CompositeControlTestCase.php mode change 100644 => 100755 tests/FunctionalTests/quickstart.php delete mode 100755 tests/FunctionalTests/selenium/core/SeleneseRunner.html delete mode 100755 tests/FunctionalTests/selenium/core/SeleniumLog.html delete mode 100755 tests/FunctionalTests/selenium/core/TestPrompt.html delete mode 100755 tests/FunctionalTests/selenium/core/TestRunner-splash.html delete mode 100755 tests/FunctionalTests/selenium/core/TestRunner.html delete mode 100755 tests/FunctionalTests/selenium/core/domviewer/butmin.gif delete mode 100755 tests/FunctionalTests/selenium/core/domviewer/butplus.gif delete mode 100755 tests/FunctionalTests/selenium/core/domviewer/domviewer.css delete mode 100755 tests/FunctionalTests/selenium/core/domviewer/domviewer.html delete mode 100755 tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/find_matching_child.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/htmlutils.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/prototype-1.4.0.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-api.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-browserbot.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-browserdetect.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-commandhandlers.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-executionloop.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-logging.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-seleneserunner.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-testrunner.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/selenium-version.js delete mode 100755 tests/FunctionalTests/selenium/core/scripts/user-extensions.js.sample delete mode 100755 tests/FunctionalTests/selenium/core/scripts/xmlextras.js delete mode 100755 tests/FunctionalTests/selenium/core/selenium-logo.png delete mode 100755 tests/FunctionalTests/selenium/core/selenium.css delete mode 100755 tests/FunctionalTests/selenium/core/xpath/dom.js delete mode 100755 tests/FunctionalTests/selenium/core/xpath/misc.js delete mode 100755 tests/FunctionalTests/selenium/core/xpath/xpath.js delete mode 100644 tests/FunctionalTests/selenium/php/TestRunner.php delete mode 100644 tests/FunctionalTests/selenium/php/results.php delete mode 100644 tests/FunctionalTests/selenium/php/selenium.php delete mode 100644 tests/FunctionalTests/selenium/prado-functional-test.js create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket220.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket225.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket225.php create mode 100644 tests/FunctionalTests/tickets/protected/pages/test.js create mode 100644 tests/FunctionalTests/tickets/tests/Ticket220TestCase.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket225TestCase.php delete mode 100644 tests/UnitTests/TODO.txt delete mode 100644 tests/UnitTests/framework/Collections/utList.php delete mode 100644 tests/UnitTests/framework/Collections/utMap.php delete mode 100644 tests/UnitTests/framework/Data/CacheTestCase.php delete mode 100644 tests/UnitTests/framework/Data/test.db delete mode 100644 tests/UnitTests/framework/Data/utAPCCache.php delete mode 100644 tests/UnitTests/framework/Data/utDateTimeSimpleFormatter.php delete mode 100644 tests/UnitTests/framework/Data/utMemCache.php delete mode 100644 tests/UnitTests/framework/Data/utSqliteCache.php delete mode 100644 tests/UnitTests/framework/Data/utXmlDocument.php delete mode 100644 tests/UnitTests/framework/Data/xml/data1.xml delete mode 100644 tests/UnitTests/framework/Data/xml/data1.xml.out delete mode 100644 tests/UnitTests/framework/Data/xml/data2.xml delete mode 100644 tests/UnitTests/framework/Data/xml/data2.xml.out delete mode 100644 tests/UnitTests/framework/Data/xml/data3.xml delete mode 100644 tests/UnitTests/framework/Data/xml/data3.xml.out delete mode 100644 tests/UnitTests/framework/I18N/TestOfDateTimeFormatInfo.php delete mode 100644 tests/UnitTests/framework/I18N/messages/en/tests.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/en/tests.po delete mode 100644 tests/UnitTests/framework/I18N/messages/en/tests.xml delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.mo.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.po delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.po.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.xml delete mode 100644 tests/UnitTests/framework/I18N/messages/en_AU/tests.xml.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.db delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.db.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en.po delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en.xml delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.mo.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.po delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.po.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.xml delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.en_AU.xml.bak delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.po delete mode 100644 tests/UnitTests/framework/I18N/messages/messages.xml delete mode 100644 tests/UnitTests/framework/I18N/messages/messages_mysql.sql delete mode 100644 tests/UnitTests/framework/I18N/messages/tests.en_AU.po delete mode 100644 tests/UnitTests/framework/I18N/messages/tests.mo delete mode 100644 tests/UnitTests/framework/I18N/messages/tests.po delete mode 100644 tests/UnitTests/framework/I18N/messages/tests.xml delete mode 100644 tests/UnitTests/framework/I18N/testChoiceFormat.php delete mode 100644 tests/UnitTests/framework/I18N/testCultureInfo.php delete mode 100644 tests/UnitTests/framework/I18N/testDateFormat.php delete mode 100644 tests/UnitTests/framework/I18N/testMessageFormat.php delete mode 100644 tests/UnitTests/framework/I18N/testMessageFormat_SQLite.php delete mode 100644 tests/UnitTests/framework/I18N/testMessageFormat_XLIFF.php delete mode 100644 tests/UnitTests/framework/I18N/testMessageFormat_gettext.php delete mode 100644 tests/UnitTests/framework/I18N/testNumberFormat.php delete mode 100644 tests/UnitTests/framework/I18N/testNumberFormatInfo.php delete mode 100644 tests/UnitTests/framework/I18N/tmp/cache.txt delete mode 100644 tests/UnitTests/framework/TestSystem/protected/application.xml delete mode 100644 tests/UnitTests/framework/TestSystem/protected/data/test.db delete mode 100644 tests/UnitTests/framework/TestSystem/protected/pages/config.xml delete mode 100644 tests/UnitTests/framework/Web/UI/utControl.php delete mode 100644 tests/UnitTests/framework/Web/UI/utJavascriptSerializer.php delete mode 100644 tests/UnitTests/framework/Web/utHttpRequest.php delete mode 100644 tests/UnitTests/framework/common.php delete mode 100644 tests/UnitTests/framework/index.php delete mode 100644 tests/UnitTests/framework/utApplication.php delete mode 100644 tests/UnitTests/framework/utComponent.php delete mode 100644 tests/UnitTests/framework/utPradoBase.php delete mode 100644 tests/UnitTests/simpletest/CHANGELOG delete mode 100644 tests/UnitTests/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE delete mode 100644 tests/UnitTests/simpletest/HtmlReporterWithCoverage.php delete mode 100644 tests/UnitTests/simpletest/LICENSE delete mode 100644 tests/UnitTests/simpletest/README delete mode 100644 tests/UnitTests/simpletest/VERSION delete mode 100644 tests/UnitTests/simpletest/authentication.php delete mode 100644 tests/UnitTests/simpletest/browser.php delete mode 100644 tests/UnitTests/simpletest/docs/en/authentication_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/browser_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/docs.css delete mode 100644 tests/UnitTests/simpletest/docs/en/expectation_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/form_testing_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/group_test_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/index.html delete mode 100644 tests/UnitTests/simpletest/docs/en/mock_objects_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/overview.html delete mode 100644 tests/UnitTests/simpletest/docs/en/partial_mocks_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/reporter_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/server_stubs_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/unit_test_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/en/web_tester_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/authentication_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/browser_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/docs.css delete mode 100644 tests/UnitTests/simpletest/docs/fr/expectation_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/form_testing_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/group_test_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/index.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/mock_objects_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/overview.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/partial_mocks_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/reporter_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/server_stubs_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/unit_test_documentation.html delete mode 100644 tests/UnitTests/simpletest/docs/fr/web_tester_documentation.html delete mode 100644 tests/UnitTests/simpletest/dumper.php delete mode 100644 tests/UnitTests/simpletest/encoding.php delete mode 100644 tests/UnitTests/simpletest/errors.php delete mode 100644 tests/UnitTests/simpletest/expectation.php delete mode 100644 tests/UnitTests/simpletest/extensions/pear_test_case.php delete mode 100644 tests/UnitTests/simpletest/extensions/phpunit_test_case.php delete mode 100644 tests/UnitTests/simpletest/form.php delete mode 100644 tests/UnitTests/simpletest/frames.php delete mode 100644 tests/UnitTests/simpletest/http.php delete mode 100644 tests/UnitTests/simpletest/mock_objects.php delete mode 100644 tests/UnitTests/simpletest/mytests/log_test.php delete mode 100644 tests/UnitTests/simpletest/options.php delete mode 100644 tests/UnitTests/simpletest/page.php delete mode 100644 tests/UnitTests/simpletest/parser.php delete mode 100644 tests/UnitTests/simpletest/remote.php delete mode 100644 tests/UnitTests/simpletest/reporter.php delete mode 100644 tests/UnitTests/simpletest/runner.php delete mode 100644 tests/UnitTests/simpletest/scorer.php delete mode 100644 tests/UnitTests/simpletest/shell_tester.php delete mode 100644 tests/UnitTests/simpletest/simple_test.php delete mode 100644 tests/UnitTests/simpletest/socket.php delete mode 100644 tests/UnitTests/simpletest/tag.php delete mode 100644 tests/UnitTests/simpletest/unit_tester.php delete mode 100644 tests/UnitTests/simpletest/url.php delete mode 100644 tests/UnitTests/simpletest/user_agent.php delete mode 100644 tests/UnitTests/simpletest/web_tester.php delete mode 100644 tests/UnitTests/simpletest/xml.php create mode 100644 tests/test_tools/README.txt create mode 100644 tests/test_tools/functional_tests.php create mode 100644 tests/test_tools/selenium/core/SeleniumLog.html create mode 100644 tests/test_tools/selenium/core/TestRunner-splash.html create mode 100644 tests/test_tools/selenium/core/scripts/find_matching_child.js create mode 100644 tests/test_tools/selenium/core/scripts/htmlutils.js create mode 100644 tests/test_tools/selenium/core/scripts/prototype-1.4.0.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-api.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-browserbot.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-browserdetect.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-commandhandlers.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-executionloop.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-logging.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-seleneserunner.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-testrunner.js create mode 100644 tests/test_tools/selenium/core/scripts/selenium-version.js create mode 100644 tests/test_tools/selenium/core/scripts/user-extensions.js.sample create mode 100644 tests/test_tools/selenium/core/scripts/xmlextras.js create mode 100644 tests/test_tools/selenium/core/selenium.css create mode 100644 tests/test_tools/selenium/core/xpath/dom.js create mode 100644 tests/test_tools/selenium/core/xpath/misc.js create mode 100644 tests/test_tools/selenium/core/xpath/xpath.js create mode 100644 tests/test_tools/selenium/php/TestRunner.php create mode 100644 tests/test_tools/selenium/php/results.php create mode 100644 tests/test_tools/selenium/php/selenium.php create mode 100644 tests/test_tools/selenium/prado-functional-test.js create mode 100755 tests/test_tools/simpletest/CHANGELOG create mode 100755 tests/test_tools/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE create mode 100644 tests/test_tools/simpletest/HtmlReporterWithCoverage.php create mode 100755 tests/test_tools/simpletest/LICENSE create mode 100755 tests/test_tools/simpletest/README create mode 100755 tests/test_tools/simpletest/VERSION create mode 100644 tests/test_tools/simpletest/authentication.php create mode 100644 tests/test_tools/simpletest/browser.php create mode 100755 tests/test_tools/simpletest/docs/en/authentication_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/browser_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/docs.css create mode 100755 tests/test_tools/simpletest/docs/en/expectation_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/form_testing_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/group_test_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/index.html create mode 100755 tests/test_tools/simpletest/docs/en/mock_objects_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/overview.html create mode 100755 tests/test_tools/simpletest/docs/en/partial_mocks_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/reporter_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/server_stubs_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/unit_test_documentation.html create mode 100755 tests/test_tools/simpletest/docs/en/web_tester_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/authentication_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/browser_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/docs.css create mode 100755 tests/test_tools/simpletest/docs/fr/expectation_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/form_testing_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/group_test_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/index.html create mode 100755 tests/test_tools/simpletest/docs/fr/mock_objects_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/overview.html create mode 100755 tests/test_tools/simpletest/docs/fr/partial_mocks_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/reporter_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/server_stubs_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/unit_test_documentation.html create mode 100755 tests/test_tools/simpletest/docs/fr/web_tester_documentation.html create mode 100644 tests/test_tools/simpletest/dumper.php create mode 100644 tests/test_tools/simpletest/encoding.php create mode 100644 tests/test_tools/simpletest/errors.php create mode 100644 tests/test_tools/simpletest/expectation.php create mode 100755 tests/test_tools/simpletest/extensions/pear_test_case.php create mode 100755 tests/test_tools/simpletest/extensions/phpunit_test_case.php create mode 100644 tests/test_tools/simpletest/form.php create mode 100644 tests/test_tools/simpletest/frames.php create mode 100644 tests/test_tools/simpletest/http.php create mode 100644 tests/test_tools/simpletest/mock_objects.php create mode 100644 tests/test_tools/simpletest/options.php create mode 100644 tests/test_tools/simpletest/page.php create mode 100644 tests/test_tools/simpletest/parser.php create mode 100644 tests/test_tools/simpletest/remote.php create mode 100644 tests/test_tools/simpletest/reporter.php create mode 100644 tests/test_tools/simpletest/runner.php create mode 100644 tests/test_tools/simpletest/scorer.php create mode 100644 tests/test_tools/simpletest/shell_tester.php create mode 100644 tests/test_tools/simpletest/simple_test.php create mode 100644 tests/test_tools/simpletest/socket.php create mode 100644 tests/test_tools/simpletest/tag.php create mode 100644 tests/test_tools/simpletest/unit_tester.php create mode 100644 tests/test_tools/simpletest/url.php create mode 100644 tests/test_tools/simpletest/user_agent.php create mode 100644 tests/test_tools/simpletest/web_tester.php create mode 100644 tests/test_tools/simpletest/xml.php create mode 100644 tests/test_tools/unit_tests.php diff --git a/.gitattributes b/.gitattributes index a309ea01..2f5fbd05 100644 --- a/.gitattributes +++ b/.gitattributes @@ -807,6 +807,7 @@ demos/quickstart/protected/pages/Configurations/Templates3.page -text demos/quickstart/protected/pages/Construction.page -text demos/quickstart/protected/pages/Controls/Button.page -text demos/quickstart/protected/pages/Controls/CheckBox.page -text +demos/quickstart/protected/pages/Controls/ClientScript.page -text demos/quickstart/protected/pages/Controls/ColorPicker.page -text demos/quickstart/protected/pages/Controls/Data.page -text demos/quickstart/protected/pages/Controls/DataGrid.page -text @@ -1705,9 +1706,6 @@ requirements/messages.txt -text requirements/template-bg.html -text requirements/template-zh.html -text requirements/template.html -text -tests/FunctionalTests/PradoTester.php -text -tests/FunctionalTests/README.txt -text -tests/FunctionalTests/config.php -text tests/FunctionalTests/features.php -text tests/FunctionalTests/features/index.php -text tests/FunctionalTests/features/protected/application.xml -text @@ -1727,11 +1725,8 @@ tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.page tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php -text tests/FunctionalTests/features/protected/pages/ActiveControls/config.xml -text tests/FunctionalTests/features/protected/pages/ColorPicker.page -text -tests/FunctionalTests/features/protected/pages/CompositeControl.page -text -tests/FunctionalTests/features/protected/pages/DatePicker.page -text tests/FunctionalTests/features/protected/pages/FeatureList.page -text tests/FunctionalTests/features/protected/pages/FeatureList.php -text -tests/FunctionalTests/features/protected/pages/HtmlArea.page -text tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page -text tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php -text tests/FunctionalTests/features/protected/pages/I18N/Home.page -text @@ -1739,9 +1734,7 @@ tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page -text tests/FunctionalTests/features/protected/pages/I18N/config.xml -text tests/FunctionalTests/features/protected/pages/RatingList.page -text tests/FunctionalTests/features/protected/pages/ValidatorEffects.page -text -tests/FunctionalTests/features/tests/CompositeControlTestCase.php -text tests/FunctionalTests/index.php -text -tests/FunctionalTests/quickstart.php -text tests/FunctionalTests/quickstart/Advanced/I18N.php -text tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php -text tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php -text @@ -1781,39 +1774,6 @@ tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php -text tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php -text tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php -text tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php -text -tests/FunctionalTests/selenium/core/SeleneseRunner.html -text -tests/FunctionalTests/selenium/core/SeleniumLog.html -text -tests/FunctionalTests/selenium/core/TestPrompt.html -text -tests/FunctionalTests/selenium/core/TestRunner-splash.html -text -tests/FunctionalTests/selenium/core/TestRunner.html -text -tests/FunctionalTests/selenium/core/domviewer/butmin.gif -text -tests/FunctionalTests/selenium/core/domviewer/butplus.gif -text -tests/FunctionalTests/selenium/core/domviewer/domviewer.css -text -tests/FunctionalTests/selenium/core/domviewer/domviewer.html -text -tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js -text -tests/FunctionalTests/selenium/core/scripts/find_matching_child.js -text -tests/FunctionalTests/selenium/core/scripts/htmlutils.js -text -tests/FunctionalTests/selenium/core/scripts/prototype-1.4.0.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-api.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-browserbot.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-browserdetect.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-commandhandlers.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-executionloop.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-logging.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-seleneserunner.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-testrunner.js -text -tests/FunctionalTests/selenium/core/scripts/selenium-version.js -text -tests/FunctionalTests/selenium/core/scripts/user-extensions.js.sample -text -tests/FunctionalTests/selenium/core/scripts/xmlextras.js -text -tests/FunctionalTests/selenium/core/selenium-logo.png -text -tests/FunctionalTests/selenium/core/selenium.css -text -tests/FunctionalTests/selenium/core/xpath/dom.js -text -tests/FunctionalTests/selenium/core/xpath/misc.js -text -tests/FunctionalTests/selenium/core/xpath/xpath.js -text -tests/FunctionalTests/selenium/php/TestRunner.php -text -tests/FunctionalTests/selenium/php/results.php -text -tests/FunctionalTests/selenium/php/selenium.php -text -tests/FunctionalTests/selenium/prado-functional-test.js -text tests/FunctionalTests/tickets.php -text tests/FunctionalTests/tickets/index.php -text tests/FunctionalTests/tickets/protected/pages/Layout.php -text @@ -1895,135 +1855,6 @@ tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php -text tests/FunctionalTests/validators/tests/RequiredFieldTestCase.php -text tests/FunctionalTests/validators/tests/RequiredListTestCase.php -text tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php -text -tests/UnitTests/TODO.txt -text -tests/UnitTests/framework/Collections/utList.php -text -tests/UnitTests/framework/Collections/utMap.php -text -tests/UnitTests/framework/Data/CacheTestCase.php -text -tests/UnitTests/framework/Data/test.db -text -tests/UnitTests/framework/Data/utAPCCache.php -text -tests/UnitTests/framework/Data/utDateTimeSimpleFormatter.php -text -tests/UnitTests/framework/Data/utMemCache.php -text -tests/UnitTests/framework/Data/utSqliteCache.php -text -tests/UnitTests/framework/Data/utXmlDocument.php -text -tests/UnitTests/framework/Data/xml/data1.xml -text -tests/UnitTests/framework/Data/xml/data1.xml.out -text -tests/UnitTests/framework/Data/xml/data2.xml -text -tests/UnitTests/framework/Data/xml/data2.xml.out -text -tests/UnitTests/framework/Data/xml/data3.xml -text -tests/UnitTests/framework/Data/xml/data3.xml.out -text -tests/UnitTests/framework/I18N/TestOfDateTimeFormatInfo.php -text -tests/UnitTests/framework/I18N/messages/en/tests.mo -text -tests/UnitTests/framework/I18N/messages/en/tests.po -text -tests/UnitTests/framework/I18N/messages/en/tests.xml -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.mo -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.mo.bak -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.po -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.po.bak -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.xml -text -tests/UnitTests/framework/I18N/messages/en_AU/tests.xml.bak -text -tests/UnitTests/framework/I18N/messages/messages.db -text -tests/UnitTests/framework/I18N/messages/messages.db.bak -text -tests/UnitTests/framework/I18N/messages/messages.en.mo -text -tests/UnitTests/framework/I18N/messages/messages.en.po -text -tests/UnitTests/framework/I18N/messages/messages.en.xml -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.mo -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.mo.bak -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.po -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.po.bak -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.xml -text -tests/UnitTests/framework/I18N/messages/messages.en_AU.xml.bak -text -tests/UnitTests/framework/I18N/messages/messages.mo -text -tests/UnitTests/framework/I18N/messages/messages.po -text -tests/UnitTests/framework/I18N/messages/messages.xml -text -tests/UnitTests/framework/I18N/messages/messages_mysql.sql -text -tests/UnitTests/framework/I18N/messages/tests.en_AU.po -text -tests/UnitTests/framework/I18N/messages/tests.mo -text -tests/UnitTests/framework/I18N/messages/tests.po -text -tests/UnitTests/framework/I18N/messages/tests.xml -text -tests/UnitTests/framework/I18N/testChoiceFormat.php -text -tests/UnitTests/framework/I18N/testCultureInfo.php -text -tests/UnitTests/framework/I18N/testDateFormat.php -text -tests/UnitTests/framework/I18N/testMessageFormat.php -text -tests/UnitTests/framework/I18N/testMessageFormat_SQLite.php -text -tests/UnitTests/framework/I18N/testMessageFormat_XLIFF.php -text -tests/UnitTests/framework/I18N/testMessageFormat_gettext.php -text -tests/UnitTests/framework/I18N/testNumberFormat.php -text -tests/UnitTests/framework/I18N/testNumberFormatInfo.php -text -tests/UnitTests/framework/I18N/tmp/cache.txt -text -tests/UnitTests/framework/TestSystem/protected/application.xml -text -tests/UnitTests/framework/TestSystem/protected/data/test.db -text -tests/UnitTests/framework/TestSystem/protected/pages/config.xml -text -tests/UnitTests/framework/Web/UI/utControl.php -text -tests/UnitTests/framework/Web/UI/utJavascriptSerializer.php -text -tests/UnitTests/framework/Web/utHttpRequest.php -text -tests/UnitTests/framework/common.php -text -tests/UnitTests/framework/index.php -text -tests/UnitTests/framework/utApplication.php -text -tests/UnitTests/framework/utComponent.php -text -tests/UnitTests/framework/utPradoBase.php -text -tests/UnitTests/simpletest/CHANGELOG -text -tests/UnitTests/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE -text -tests/UnitTests/simpletest/HtmlReporterWithCoverage.php -text -tests/UnitTests/simpletest/LICENSE -text -tests/UnitTests/simpletest/README -text -tests/UnitTests/simpletest/VERSION -text -tests/UnitTests/simpletest/authentication.php -text -tests/UnitTests/simpletest/browser.php -text -tests/UnitTests/simpletest/docs/en/authentication_documentation.html -text -tests/UnitTests/simpletest/docs/en/browser_documentation.html -text -tests/UnitTests/simpletest/docs/en/docs.css -text -tests/UnitTests/simpletest/docs/en/expectation_documentation.html -text -tests/UnitTests/simpletest/docs/en/form_testing_documentation.html -text -tests/UnitTests/simpletest/docs/en/group_test_documentation.html -text -tests/UnitTests/simpletest/docs/en/index.html -text -tests/UnitTests/simpletest/docs/en/mock_objects_documentation.html -text -tests/UnitTests/simpletest/docs/en/overview.html -text -tests/UnitTests/simpletest/docs/en/partial_mocks_documentation.html -text -tests/UnitTests/simpletest/docs/en/reporter_documentation.html -text -tests/UnitTests/simpletest/docs/en/server_stubs_documentation.html -text -tests/UnitTests/simpletest/docs/en/unit_test_documentation.html -text -tests/UnitTests/simpletest/docs/en/web_tester_documentation.html -text -tests/UnitTests/simpletest/docs/fr/authentication_documentation.html -text -tests/UnitTests/simpletest/docs/fr/browser_documentation.html -text -tests/UnitTests/simpletest/docs/fr/docs.css -text -tests/UnitTests/simpletest/docs/fr/expectation_documentation.html -text -tests/UnitTests/simpletest/docs/fr/form_testing_documentation.html -text -tests/UnitTests/simpletest/docs/fr/group_test_documentation.html -text -tests/UnitTests/simpletest/docs/fr/index.html -text -tests/UnitTests/simpletest/docs/fr/mock_objects_documentation.html -text -tests/UnitTests/simpletest/docs/fr/overview.html -text -tests/UnitTests/simpletest/docs/fr/partial_mocks_documentation.html -text -tests/UnitTests/simpletest/docs/fr/reporter_documentation.html -text -tests/UnitTests/simpletest/docs/fr/server_stubs_documentation.html -text -tests/UnitTests/simpletest/docs/fr/unit_test_documentation.html -text -tests/UnitTests/simpletest/docs/fr/web_tester_documentation.html -text -tests/UnitTests/simpletest/dumper.php -text -tests/UnitTests/simpletest/encoding.php -text -tests/UnitTests/simpletest/errors.php -text -tests/UnitTests/simpletest/expectation.php -text -tests/UnitTests/simpletest/extensions/pear_test_case.php -text -tests/UnitTests/simpletest/extensions/phpunit_test_case.php -text -tests/UnitTests/simpletest/form.php -text -tests/UnitTests/simpletest/frames.php -text -tests/UnitTests/simpletest/http.php -text -tests/UnitTests/simpletest/mock_objects.php -text -tests/UnitTests/simpletest/mytests/log_test.php -text -tests/UnitTests/simpletest/options.php -text -tests/UnitTests/simpletest/page.php -text -tests/UnitTests/simpletest/parser.php -text -tests/UnitTests/simpletest/remote.php -text -tests/UnitTests/simpletest/reporter.php -text -tests/UnitTests/simpletest/runner.php -text -tests/UnitTests/simpletest/scorer.php -text -tests/UnitTests/simpletest/shell_tester.php -text -tests/UnitTests/simpletest/simple_test.php -text -tests/UnitTests/simpletest/socket.php -text -tests/UnitTests/simpletest/tag.php -text -tests/UnitTests/simpletest/unit_tester.php -text -tests/UnitTests/simpletest/url.php -text -tests/UnitTests/simpletest/user_agent.php -text -tests/UnitTests/simpletest/web_tester.php -text -tests/UnitTests/simpletest/xml.php -text tests/unit/Collections/TListTest.php -text tests/unit/Collections/TMapTest.php -text tests/unit/I18N/core/CultureInfoTest.php -text diff --git a/HISTORY b/HISTORY index f23dc280..fe92f7fd 100644 --- a/HISTORY +++ b/HISTORY @@ -15,6 +15,9 @@ Version 3.0.3 August 6, 2006 BUG: Ticket#264 - Typos in some exception throw statements (Knut) BUG: Ticket#268 - THttpResponse.redirect() may fail for some browsers (Qiang) BUG: TDataGrid may complain getting ItemType on a non-object if the grid is not data-bound (Qiang) +ENH: Ticket#220 - TClientScripts method to import custom javascript files (Wei) +ENH: Ticket#225 - TRadioButton::getRadioButtonsInGroup() added (Wei) +ENH: Ticket#223 - Use TRequiredFieldValidator for TRadioButtons with GroupName property (Wei) NEW: Added TStyleSheet (Wei) Version 3.0.2 July 2, 2006 diff --git a/buildscripts/texbuilder/pages.php b/buildscripts/texbuilder/pages.php index f49d15fd..9b8a97ad 100644 --- a/buildscripts/texbuilder/pages.php +++ b/buildscripts/texbuilder/pages.php @@ -33,6 +33,7 @@ $pages['Configurations'] = array( $pages['Control Reference : Standard Controls'] = array( 'Controls/Button.page', 'Controls/CheckBox.page', + 'Controls/ClientScript.page', 'Controls/ColorPicker.page', 'Controls/DatePicker.page', 'Controls/Expression.page', diff --git a/demos/quickstart/protected/pages/Advanced/Scripts3.page b/demos/quickstart/protected/pages/Advanced/Scripts3.page index 9883f43e..123caa3a 100644 --- a/demos/quickstart/protected/pages/Advanced/Scripts3.page +++ b/demos/quickstart/protected/pages/Advanced/Scripts3.page @@ -29,4 +29,7 @@ that require a particular library will also automatically load the necessary lib For example, if you add a TDatePicker component on the page, the datapicker and its dependencies will be automatically included on the page.
+See TClientScript for options of adding + your custom javascript code to the page.
+ \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/ClientScript.page b/demos/quickstart/protected/pages/Controls/ClientScript.page new file mode 100644 index 00000000..5dab41d5 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/ClientScript.page @@ -0,0 +1,52 @@ ++TClientScript allows javascript code to be insert or linked to the +page template. Prado is bundled with a large library of javascript functionality +including effects, AJAX, basic event handlers, and many others. The bundled +javascript libraries can be linked to the current page template using the +UsingPradoScripts property. Multiple bundled javascript libraries +can be specified using comma delimited string of the name of javascript library +to include on the page. For following example will include the "ajax" and "effects" library. +
++ The available bundled libraries included in Prado are +
The dependencies for each library are automatically resolved. That is, + specifying, say the "ajax", will also include the "prado" library.
+ +Custom javascript files can be register using the ScriptUrl property. +The following example includes the javascript file "test.js" to the page. In this case, the file +"test.js" is relative the current template you are using. Since the property value is +dynamic asset tag, the file "test.js" will be published +automatically, that is, the file will be copied to the assets directory if necessary. +
+You can include javascript files from other servers by specifying the full URL string in + the ScriptUrl property.
+ +Any content within the TClientScript control tag will be considered as + javascript code and will be rendered where it is declared.
+ +
- *
+ *
*
*
- * The {@link setPreRenderControlTypes PreRenderControlTypes} property can
- * be used to specify that controls type/class names that should pre-render itself
- * even though they may not be rendered on the page. This is useful to publish
- * controls that require assets and is only visible after a callback response.
- *
* Custom javascript files can be register using the {@link setScriptUrl ScriptUrl}
* property.
*
@@ -34,17 +29,12 @@
*
*
* Contents within TClientScript will be treated as javascript code and will be
- * rendered.
- *
- * The {@link setScriptPosition ScriptPosition} property specifies where the script
- * will be rendered. The allows values of {@link setScriptPosition ScriptPosition} are
+ * rendered in place.
*
- * - Head -- renders the script within the <head>
- * - Begin -- renders the script within and near the begining of TForm
- * - Here -- renders the script inplace, this is the default
- * - End -- renders the script within and near the end of TForm
- *
- * TODO: Allow binding expressions inside scripts
+ * The {@link setPreRenderControlTypes PreRenderControlTypes} property can
+ * be used to specify that controls type/class names that should pre-render itself
+ * even though they may not be rendered on the page. This is useful to publish
+ * controls that require assets and is only visible after a callback response.
*
* @author Wei Zhuo Default TDatePicker | -
- |
-
Button Mode, pre-selected date | -
- |
-
InputMode="DropDownList", custom DateFormat | -
- |
-
InputMode="DropDownList", custom DateFormat, Culture | -
- |
-
Custom DateFormat, culture, ImageButton mode, pre-selected date | -
- |
-
Custom DateFormat, DropDownList, pre-selected date set in as Text | -
- |
-
DropDownList, pre-selected date as integer | -
- |
-
-
|
-
- Last Four Test Commands: - - |
- ||
- - | -
↑ | -↑ | -↑ | -
---|---|---|
Test Suite | -Current Test | -Control Panel | -
- |
-
-![]() Selenium-by ThoughtWorks and friends- --For more information on Selenium, visit - - - http://selenium.openqa.org -- - |
-|
This page is generated using JavaScript. If you see this text, your - browser doesn't support JavaScript.
- - - diff --git a/tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js b/tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js deleted file mode 100755 index 941aab16..00000000 --- a/tests/FunctionalTests/selenium/core/domviewer/selenium-domviewer.js +++ /dev/null @@ -1,205 +0,0 @@ -var HIDDEN="hidden"; -var LEVEL = "level"; -var PLUS_SRC="butplus.gif"; -var MIN_SRC="butmin.gif"; -var newRoot; -var maxColumns=1; - -function loadDomViewer() { - // See if the rootDocument variable has been set on this window. - var rootDocument = window.rootDocument; - - // If not look to the opener for an explicity rootDocument variable, otherwise, use the opener document - if (!rootDocument && window.opener) { - rootDocument = window.opener.rootDocument || window.opener.document; - } - - if (rootDocument) { - document.body.innerHTML = displayDOM(rootDocument); - } - else { - document.body.innerHTML = "Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window."; - } -} - - -function displayDOM(root){ - var str = ""; - str+=""; - } - str += " |
- * Element Locators tell Selenium which HTML element a command refers to. - * The format of a locator is:
- *- * locatorType=argument - *- * - *
- * We support the following strategies for locating elements: - *
- *- *- *- *
- *- identifier=id
- *- Select the element with the specified @id attribute. If no match is - * found, select the first element whose @name attribute is id. - * (This is normally the default; see below.)
- *- id=id
- *- Select the element with the specified @id attribute.
- * - *- name=name
- *- Select the first element with the specified @name attribute.
- *- - *
- *
- *- username
- *- name=username
- *- The name may optionally be followed by one or more element-filters, separated from the name by whitespace. If the filterType is not specified, value is assumed.
- * - *- - *
- *
- *- name=flavour value=chocolate
- *- dom=javascriptExpression
- * - *- - * - *
- * - *- Find an element using JavaScript traversal of the HTML Document Object - * Model. DOM locators must begin with "document.". - *
- * - *- *
- *- dom=document.forms['myForm'].myDropdown
- *- dom=document.images[56]
- *- xpath=xpathExpression
- *- Locate an element using an XPath expression. - *
- *- *
- *- xpath=//img[@alt='The image alt text']
- *- xpath=//table[@id='table1']//tr[4]/td[2]
- * - *- link=textPattern
- *- Select the link (anchor) element which contains text matching the - * specified pattern. - *
- *- *
- * - *- link=The link text
- *
- * Without an explicit locator prefix, Selenium uses the following default - * strategies: - *
- * - *- *- * - *Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.
- *Filters look much like locators, ie.
- *- * filterType=argument- * - *Supported element-filters are:
- *value=valuePattern
- *- * Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.- *index=index
- *- * Selects a single element based on its position in the list (offset from zero).- *
- * Various Pattern syntaxes are available for matching string values: - *
- *- *- *- *
- *- glob:pattern
- *- Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a - * kind of limited regular-expression syntax typically used in command-line - * shells. In a glob pattern, "*" represents any sequence of characters, and "?" - * represents any single character. Glob patterns match against the entire - * string.
- *- regexp:regexp
- *- Match a string using a regular-expression. The full power of JavaScript - * regular-expressions is available.
- *- exact:string
- * - *- Match a string exactly, verbatim, without any of that fancy wildcard - * stuff.
- *
- * If no pattern prefix is specified, Selenium assumes that it's a "glob" - * pattern. - *
- */ - this.browserbot = browserbot; - this.optionLocatorFactory = new OptionLocatorFactory(); - this.page = function() { - return browserbot.getCurrentPage(); - }; -} - -Selenium.createForFrame = function(frame) { - return new Selenium(BrowserBot.createForFrame(frame)); -}; - -Selenium.prototype.reset = function() { - /** - * Clear out all stored variables and select the null (starting) window - */ - storedVars = new Object(); - this.browserbot.selectWindow("null"); -}; - -Selenium.prototype.doClick = function(locator) { - /** - * Clicks on a link, button, checkbox or radio button. If the click action - * causes a new page to load (like a link usually does), call - * waitForPageToLoad. - * - * @param locator an element locator - * - */ - var element = this.page().findElement(locator); - this.page().clickElement(element); -}; - -Selenium.prototype.doFireEvent = function(locator, eventName) { - /** - * Explicitly simulate an event, to trigger the corresponding "onevent" - * handler. - * - * @param locator an element locator - * @param eventName the event name, e.g. "focus" or "blur" - */ - var element = this.page().findElement(locator); - triggerEvent(element, eventName, false); -}; - -Selenium.prototype.doKeyPress = function(locator, keycode) { - /** - * Simulates a user pressing and releasing a key. - * - * @param locator an element locator - * @param keycode the numeric keycode of the key to be pressed, normally the - * ASCII value of that key. - */ - var element = this.page().findElement(locator); - triggerKeyEvent(element, 'keypress', keycode, true); -}; - -Selenium.prototype.doKeyDown = function(locator, keycode) { - /** - * Simulates a user pressing a key (without releasing it yet). - * - * @param locator an element locator - * @param keycode the numeric keycode of the key to be pressed, normally the - * ASCII value of that key. - */ - var element = this.page().findElement(locator); - triggerKeyEvent(element, 'keydown', keycode, true); -}; - -Selenium.prototype.doKeyUp = function(locator, keycode) { - /** - * Simulates a user releasing a key. - * - * @param locator an element locator - * @param keycode the numeric keycode of the key to be released, normally the - * ASCII value of that key. - */ - var element = this.page().findElement(locator); - triggerKeyEvent(element, 'keyup', keycode, true); -}; - -Selenium.prototype.doMouseOver = function(locator) { - /** - * Simulates a user hovering a mouse over the specified element. - * - * @param locator an element locator - */ - var element = this.page().findElement(locator); - triggerMouseEvent(element, 'mouseover', true); -}; - -Selenium.prototype.doMouseDown = function(locator) { - /** - * Simulates a user pressing the mouse button (without releasing it yet) on - * the specified element. - * - * @param locator an element locator - */ - var element = this.page().findElement(locator); - triggerMouseEvent(element, 'mousedown', true); -}; - -Selenium.prototype.doType = function(locator, value) { - /** - * Sets the value of an input field, as though you typed it in. - * - *Can also be used to set the value of combo boxes, check boxes, etc. In these cases, - * value should be the value of the option selected, not the visible text.
- * - * @param locator an element locator - * @param value the value to type - */ - // TODO fail if it can't be typed into. - var element = this.page().findElement(locator); - this.page().replaceText(element, value); -}; - -Selenium.prototype.findToggleButton = function(locator) { - var element = this.page().findElement(locator); - if (element.checked == null) { - Assert.fail("Element " + locator + " is not a toggle-button."); - } - return element; -} - -Selenium.prototype.doCheck = function(locator) { - /** - * Check a toggle-button (checkbox/radio) - * - * @param locator an element locator - */ - this.findToggleButton(locator).checked = true; -}; - -Selenium.prototype.doUncheck = function(locator) { - /** - * Uncheck a toggle-button (checkbox/radio) - * - * @param locator an element locator - */ - this.findToggleButton(locator).checked = false; -}; - -Selenium.prototype.doSelect = function(selectLocator, optionLocator) { - /** - * Select an option from a drop-down using an option locator. - * - *- * Option locators provide different ways of specifying options of an HTML - * Select element (e.g. for selecting a specific option, or for asserting - * that the selected option satisfies a specification). There are several - * forms of Select Option Locator. - *
- *- * If no option locator prefix is provided, the default behaviour is to match on label. - *
- * - * - * @param selectLocator an element locator identifying a drop-down menu - * @param optionLocator an option locator (a label by default) - */ - var element = this.page().findElement(selectLocator); - if (!("options" in element)) { - throw new SeleniumError("Specified element is not a Select (has no options)"); - } - var locator = this.optionLocatorFactory.fromLocatorString(optionLocator); - var option = locator.findOption(element); - this.page().selectOption(element, option); -}; - -Selenium.prototype.doAddSelection = function(locator, optionLocator) { - /** - * Add a selection to the set of selected options in a multi-select element using an option locator. - * - * @see #doSelect for details of option locators - * - * @param locator an element locator identifying a multi-select box - * @param optionLocator an option locator (a label by default) - */ - var element = this.page().findElement(locator); - if (!("options" in element)) { - throw new SeleniumError("Specified element is not a Select (has no options)"); - } - var locator = this.optionLocatorFactory.fromLocatorString(optionLocator); - var option = locator.findOption(element); - this.page().addSelection(element, option); -}; - -Selenium.prototype.doRemoveSelection = function(locator, optionLocator) { - /** - * Remove a selection from the set of selected options in a multi-select element using an option locator. - * - * @see #doSelect for details of option locators - * - * @param locator an element locator identifying a multi-select box - * @param optionLocator an option locator (a label by default) - */ - - var element = this.page().findElement(locator); - if (!("options" in element)) { - throw new SeleniumError("Specified element is not a Select (has no options)"); - } - var locator = this.optionLocatorFactory.fromLocatorString(optionLocator); - var option = locator.findOption(element); - this.page().removeSelection(element, option); -}; - -Selenium.prototype.doSubmit = function(formLocator) { - /** - * Submit the specified form. This is particularly useful for forms without - * submit buttons, e.g. single-input "Search" forms. - * - * @param formLocator an element locator for the form you want to submit - */ - var form = this.page().findElement(formLocator); - var actuallySubmit = true; - if (form.onsubmit) { - // apply this to the correct window so alerts are properly handled, even in IE HTA mode - actuallySubmit = form.onsubmit.apply(this.browserbot.getContentWindow()); - } - if (actuallySubmit) { - form.submit(); - } - -}; - -Selenium.prototype.doOpen = function(url) { - /** - * Opens an URL in the test frame. This accepts both relative and absolute - * URLs. - * - * The "open" command waits for the page to load before proceeding, - * ie. the "AndWait" suffix is implicit. - * - * Note: The URL must be on the same domain as the runner HTML - * due to security restrictions in the browser (Same Origin Policy). If you - * need to open an URL on another domain, use the Selenium Server to start a - * new browser session on that domain. - * - * @param url the URL to open; may be relative or absolute - */ - this.browserbot.openLocation(url); - return SELENIUM_PROCESS_WAIT; -}; - -Selenium.prototype.doSelectWindow = function(windowID) { - /** - * Selects a popup window; once a popup window has been selected, all - * commands go to that window. To select the main window again, use "null" - * as the target. - * - * @param windowID the JavaScript window ID of the window to select - */ - this.browserbot.selectWindow(windowID); -}; - -Selenium.prototype.doWaitForPopUp = function(windowID, timeout) { - /** - * Waits for a popup window to appear and load up. - * - * @param windowID the JavaScript window ID of the window that will appear - * @param timeout a timeout in milliseconds, after which the action will return with an error - */ - if (isNaN(timeout)) { - throw new SeleniumError("Timeout is not a number: " + timeout); - } - - testLoop.waitForCondition = function () { - var targetWindow = selenium.browserbot.getTargetWindow(windowID); - if (!targetWindow) return false; - if (!targetWindow.location) return false; - if ("about:blank" == targetWindow.location) return false; - if (!targetWindow.document) return false; - if (!targetWindow.document.readyState) return true; - if ('complete' != targetWindow.document.readyState) return false; - return true; - }; - - testLoop.waitForConditionStart = new Date().getTime(); - testLoop.waitForConditionTimeout = timeout; - -} - -Selenium.prototype.doWaitForPopUp.dontCheckAlertsAndConfirms = true; - -Selenium.prototype.doChooseCancelOnNextConfirmation = function() { - /** - * By default, Selenium's overridden window.confirm() function will - * return true, as if the user had manually clicked OK. After running - * this command, the next call to confirm() will return false, as if - * the user had clicked Cancel. - * - */ - this.browserbot.cancelNextConfirmation(); -}; - - -Selenium.prototype.doAnswerOnNextPrompt = function(answer) { - /** - * Instructs Selenium to return the specified answer string in response to - * the next JavaScript prompt [window.prompt()]. - * - * - * @param answer the answer to give in response to the prompt pop-up - */ - this.browserbot.setNextPromptResult(answer); -}; - -Selenium.prototype.doGoBack = function() { - /** - * Simulates the user clicking the "back" button on their browser. - * - */ - this.page().goBack(); -}; - -Selenium.prototype.doRefresh = function() { - /** - * Simulates the user clicking the "Refresh" button on their browser. - * - */ - this.page().refresh(); -}; - -Selenium.prototype.doClose = function() { - /** - * Simulates the user clicking the "close" button in the titlebar of a popup - * window or tab. - */ - this.page().close(); -}; - -Selenium.prototype.isAlertPresent = function() { - /** - * Has an alert occurred? - * - *- * This function never throws an exception - *
- * @return boolean true if there is an alert - */ - return this.browserbot.hasAlerts(); -}; -Selenium.prototype.isPromptPresent = function() { - /** - * Has a prompt occurred? - * - *- * This function never throws an exception - *
- * @return boolean true if there is a pending prompt - */ - return this.browserbot.hasPrompts(); -}; -Selenium.prototype.isConfirmationPresent = function() { - /** - * Has confirm() been called? - * - *- * This function never throws an exception - *
- * @return boolean true if there is a pending confirmation - */ - return this.browserbot.hasConfirmations(); -}; -Selenium.prototype.getAlert = function() { - /** - * Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts. - * - *Getting an alert has the same effect as manually clicking OK. If an - * alert is generated but you do not get/verify it, the next Selenium action - * will fail.
- * - *NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert - * dialog.
- * - *NOTE: Selenium does NOT support JavaScript alerts that are generated in a - * page's onload() event handler. In this case a visible dialog WILL be - * generated and Selenium will hang until someone manually clicks OK.
- * @return string The message of the most recent JavaScript alert - */ - if (!this.browserbot.hasAlerts()) { - Assert.fail("There were no alerts"); - } - return this.browserbot.getNextAlert(); -}; -Selenium.prototype.getAlert.dontCheckAlertsAndConfirms = true; - -Selenium.prototype.getConfirmation = function() { - /** - * Retrieves the message of a JavaScript confirmation dialog generated during - * the previous action. - * - *- * By default, the confirm function will return true, having the same effect - * as manually clicking OK. This can be changed by prior execution of the - * chooseCancelOnNextConfirmation command. If an confirmation is generated - * but you do not get/verify it, the next Selenium action will fail. - *
- * - *- * NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible - * dialog. - *
- * - *- * NOTE: Selenium does NOT support JavaScript confirmations that are - * generated in a page's onload() event handler. In this case a visible - * dialog WILL be generated and Selenium will hang until you manually click - * OK. - *
- * - * @return string the message of the most recent JavaScript confirmation dialog - */ - if (!this.browserbot.hasConfirmations()) { - Assert.fail("There were no confirmations"); - } - return this.browserbot.getNextConfirmation(); -}; -Selenium.prototype.getConfirmation.dontCheckAlertsAndConfirms = true; - -Selenium.prototype.getPrompt = function() { - /** - * Retrieves the message of a JavaScript question prompt dialog generated during - * the previous action. - * - *Successful handling of the prompt requires prior execution of the - * answerOnNextPrompt command. If a prompt is generated but you - * do not get/verify it, the next Selenium action will fail.
- * - *NOTE: under Selenium, JavaScript prompts will NOT pop up a visible - * dialog.
- * - *NOTE: Selenium does NOT support JavaScript prompts that are generated in a - * page's onload() event handler. In this case a visible dialog WILL be - * generated and Selenium will hang until someone manually clicks OK.
- * @return string the message of the most recent JavaScript question prompt - */ - if (! this.browserbot.hasPrompts()) { - Assert.fail("There were no prompts"); - } - return this.browserbot.getNextPrompt(); -}; - -Selenium.prototype.getLocation = function() { - /** Gets the absolute URL of the current page. - * - * @return string the absolute URL of the current page - */ - return this.page().location; -}; - -Selenium.prototype.getTitle = function() { - /** Gets the title of the current page. - * - * @return string the title of the current page - */ - return this.page().title(); -}; - - -Selenium.prototype.getBodyText = function() { - /** - * Gets the entire text of the page. - * @return string the entire text of the page - */ - return this.page().bodyText(); -}; - - -Selenium.prototype.getValue = function(locator) { - /** - * Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter). - * For checkbox/radio elements, the value will be "on" or "off" depending on - * whether the element is checked or not. - * - * @param locator an element locator - * @return string the element value, or "on/off" for checkbox/radio elements - */ - var element = this.page().findElement(locator) - return getInputValue(element).trim(); -} - -Selenium.prototype.getText = function(locator) { - /** - * Gets the text of an element. This works for any element that contains - * text. This command uses either the textContent (Mozilla-like browsers) or - * the innerText (IE-like browsers) of the element, which is the rendered - * text shown to the user. - * - * @param locator an element locator - * @return string the text of the element - */ - var element = this.page().findElement(locator); - return getText(element).trim(); -}; - -Selenium.prototype.getEval = function(script) { - /** Gets the result of evaluating the specified JavaScript snippet. The snippet may - * have multiple lines, but only the result of the last line will be returned. - * - *Note that, by default, the snippet will run in the context of the "selenium"
- * object itself, so this
will refer to the Selenium object, and window
will
- * refer to the top-level runner test window, not the window of your application.
If you need a reference to the window of your application, you can refer
- * to this.browserbot.getCurrentWindow()
and if you need to use
- * a locator to refer to a single element in your application page, you can
- * use this.page().findElement("foo")
where "foo" is your locator.
See the select command for more information about option locators.
- * - * @param selectLocator an element locator identifying a drop-down menu - * @param optionLocator an option locator, typically just an option label (e.g. "John Smith") - */ - var element = this.page().findElement(selectLocator); - var locator = this.optionLocatorFactory.fromLocatorString(optionLocator); - if (element.selectedIndex == -1) - { - Assert.fail("No option selected"); - } - locator.assertSelected(element); -}; - -Selenium.prototype.getSelectedLabels = function(selectLocator) { - /** Gets all option labels (visible text) for selected options in the specified select or multi-select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string[] an array of all selected option labels in the specified select drop-down - */ - return this.findSelectedOptionProperties(selectLocator, "text").join(","); -} - -Selenium.prototype.getSelectedLabel = function(selectLocator) { - /** Gets option label (visible text) for selected option in the specified select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string the selected option label in the specified select drop-down - */ - return this.findSelectedOptionProperty(selectLocator, "text"); -} - -Selenium.prototype.getSelectedValues = function(selectLocator) { - /** Gets all option values (value attributes) for selected options in the specified select or multi-select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string[] an array of all selected option values in the specified select drop-down - */ - return this.findSelectedOptionProperties(selectLocator, "value").join(","); -} - -Selenium.prototype.getSelectedValue = function(selectLocator) { - /** Gets option value (value attribute) for selected option in the specified select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string the selected option value in the specified select drop-down - */ - return this.findSelectedOptionProperty(selectLocator, "value"); -} - -Selenium.prototype.getSelectedIndexes = function(selectLocator) { - /** Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string[] an array of all selected option indexes in the specified select drop-down - */ - return this.findSelectedOptionProperties(selectLocator, "index").join(","); -} - -Selenium.prototype.getSelectedIndex = function(selectLocator) { - /** Gets option index (option number, starting at 0) for selected option in the specified select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string the selected option index in the specified select drop-down - */ - return this.findSelectedOptionProperty(selectLocator, "index"); -} - -Selenium.prototype.getSelectedIds = function(selectLocator) { - /** Gets all option element IDs for selected options in the specified select or multi-select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string[] an array of all selected option IDs in the specified select drop-down - */ - return this.findSelectedOptionProperties(selectLocator, "id").join(","); -} - -Selenium.prototype.getSelectedId = function(selectLocator) { - /** Gets option element ID for selected option in the specified select element. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string the selected option ID in the specified select drop-down - */ - return this.findSelectedOptionProperty(selectLocator, "id"); -} - -Selenium.prototype.isSomethingSelected = function(selectLocator) { - /** Determines whether some option in a drop-down menu is selected. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return boolean true if some option has been selected, false otherwise - */ - var element = this.page().findElement(selectLocator); - if (!("options" in element)) { - throw new SeleniumError("Specified element is not a Select (has no options)"); - } - - var selectedOptions = []; - - for (var i = 0; i < element.options.length; i++) { - if (element.options[i].selected) - { - return true; - } - } - return false; -} - -Selenium.prototype.findSelectedOptionProperties = function(locator, property) { - var element = this.page().findElement(locator); - if (!("options" in element)) { - throw new SeleniumError("Specified element is not a Select (has no options)"); - } - - var selectedOptions = []; - - for (var i = 0; i < element.options.length; i++) { - if (element.options[i].selected) - { - var propVal = element.options[i][property]; - if (propVal.replace) { - propVal.replace(/,/g, "\\,"); - } - selectedOptions.push(propVal); - } - } - if (selectedOptions.length == 0) Assert.fail("No option selected"); - return selectedOptions; -} - -Selenium.prototype.findSelectedOptionProperty = function(locator, property) { - var selectedOptions = this.findSelectedOptionProperties(locator, property); - if (selectedOptions.length > 1) { - Assert.fail("More than one selected option!"); - } - return selectedOptions[0]; -} - -Selenium.prototype.getSelectOptions = function(selectLocator) { - /** Gets all option labels in the specified select drop-down. - * - * @param selectLocator an element locator identifying a drop-down menu - * @return string[] an array of all option labels in the specified select drop-down - */ - var element = this.page().findElement(selectLocator); - - var selectOptions = []; - - for (var i = 0; i < element.options.length; i++) { - var option = element.options[i].text.replace(/,/g, "\\,"); - selectOptions.push(option); - } - - return selectOptions.join(","); -}; - - -Selenium.prototype.getAttribute = function(attributeLocator) { - /** - * Gets the value of an element attribute. - * @param attributeLocator an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" - * @return string the value of the specified attribute - */ - var result = this.page().findAttribute(attributeLocator); - if (result == null) { - throw new SeleniumError("Could not find element attribute: " + attributeLocator); - } - return result; -}; - -Selenium.prototype.isTextPresent = function(pattern) { - /** - * Verifies that the specified text pattern appears somewhere on the rendered page shown to the user. - * @param pattern a pattern to match with the text of the page - * @return boolean true if the pattern matches the text, false otherwise - */ - var allText = this.page().bodyText(); - - if(allText == "") { - Assert.fail("Page text not found"); - } else { - var patternMatcher = new PatternMatcher(pattern); - if (patternMatcher.strategy == PatternMatcher.strategies.glob) { - patternMatcher.matcher = new PatternMatcher.strategies.globContains(pattern); - } - return patternMatcher.matches(allText); - } -}; - -Selenium.prototype.isElementPresent = function(locator) { - /** - * Verifies that the specified element is somewhere on the page. - * @param locator an element locator - * @return boolean true if the element is present, false otherwise - */ - try { - this.page().findElement(locator); - } catch (e) { - return false; - } - return true; -}; - -Selenium.prototype.isVisible = function(locator) { - /** - * Determines if the specified element is visible. An - * element can be rendered invisible by setting the CSS "visibility" - * property to "hidden", or the "display" property to "none", either for the - * element itself or one if its ancestors. This method will fail if - * the element is not present. - * - * @param locator an element locator - * @return boolean true if the specified element is visible, false otherwise - */ - var element; - element = this.page().findElement(locator); - - if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - var visibility = element.style["visibility"]; - else - var visibility = this.findEffectiveStyleProperty(element, "visibility"); - - var _isDisplayed = this._isDisplayed(element); - return (visibility != "hidden" && _isDisplayed); -}; - -Selenium.prototype.findEffectiveStyleProperty = function(element, property) { - var effectiveStyle = this.findEffectiveStyle(element); - var propertyValue = effectiveStyle[property]; - if (propertyValue == 'inherit' && element.parentNode.style) { - return this.findEffectiveStyleProperty(element.parentNode, property); - } - return propertyValue; -}; - -Selenium.prototype._isDisplayed = function(element) { - if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - var display = element.style["display"]; - else - var display = this.findEffectiveStyleProperty(element, "display"); - if (display == "none") return false; - if (element.parentNode.style) { - return this._isDisplayed(element.parentNode); - } - return true; -}; - -Selenium.prototype.findEffectiveStyle = function(element) { - if (element.style == undefined) { - return undefined; // not a styled element - } - var window = this.browserbot.getContentWindow(); - if (window.getComputedStyle) { - // DOM-Level-2-CSS - return window.getComputedStyle(element, null); - } - if (element.currentStyle) { - // non-standard IE alternative - return element.currentStyle; - // TODO: this won't really work in a general sense, as - // currentStyle is not identical to getComputedStyle() - // ... but it's good enough for "visibility" - } - throw new SeleniumError("cannot determine effective stylesheet in this browser"); -}; - -Selenium.prototype.isEditable = function(locator) { - /** - * Determines whether the specified input element is editable, ie hasn't been disabled. - * This method will fail if the specified element isn't an input element. - * - * @param locator an element locator - * @return boolean true if the input element is editable, false otherwise - */ - var element = this.page().findElement(locator); - if (element.value == undefined) { - Assert.fail("Element " + locator + " is not an input."); - } - return !element.disabled; -}; - -Selenium.prototype.getAllButtons = function() { - /** Returns the IDs of all buttons on the page. - * - *If a given button has no ID, it will appear as "" in this array.
- * - * @return string[] the IDs of all buttons on the page - */ - return this.page().getAllButtons(); -}; - -Selenium.prototype.getAllLinks = function() { - /** Returns the IDs of all links on the page. - * - *If a given link has no ID, it will appear as "" in this array.
- * - * @return string[] the IDs of all links on the page - */ - return this.page().getAllLinks(); -}; - -Selenium.prototype.getAllFields = function() { - /** Returns the IDs of all input fields on the page. - * - *If a given field has no ID, it will appear as "" in this array.
- * - * @return string[] the IDs of all field on the page - */ - return this.page().getAllFields(); -}; - -Selenium.prototype.getHtmlSource = function() { - /** Returns the entire HTML source between the opening and - * closing "html" tags. - * - * @return string the entire HTML source - */ - return this.page().currentDocument.getElementsByTagName("html")[0].innerHTML; -}; - -Selenium.prototype.doSetCursorPosition = function(locator, position) { - /** - * Moves the text cursor to the specified position in the given input element or textarea. - * This method will fail if the specified element isn't an input element or textarea. - * - * @param locator an element locator pointing to an input element or textarea - * @param position the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. - */ - var element = this.page().findElement(locator); - if (element.value == undefined) { - Assert.fail("Element " + locator + " is not an input."); - } - if (position == -1) { - position = element.value.length; - } - - if( element.setSelectionRange && !browserVersion.isOpera) { - element.focus(); - element.setSelectionRange(/*start*/position,/*end*/position); - } - else if( element.createTextRange ) { - triggerEvent(element, 'focus', false); - var range = element.createTextRange(); - range.collapse(true); - range.moveEnd('character',position); - range.moveStart('character',position); - range.select(); - } -} - -Selenium.prototype.getCursorPosition = function(locator) { - /** - * Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers. - * - *Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to - * return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
- * This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element. - * - * @param locator an element locator pointing to an input element or textarea - * @return number the numerical position of the cursor in the field - */ - var element = this.page().findElement(locator); - var doc = this.page().currentDocument; - var win = this.browserbot.getCurrentWindow(); - if( doc.selection && !browserVersion.isOpera){ - - var selectRange = doc.selection.createRange().duplicate(); - var elementRange = element.createTextRange(); - selectRange.move("character",0); - elementRange.move("character",0); - var inRange1 = selectRange.inRange(elementRange); - var inRange2 = elementRange.inRange(selectRange); - try { - elementRange.setEndPoint("EndToEnd", selectRange); - } catch (e) { - Assert.fail("There is no cursor on this page!"); - } - var answer = String(elementRange.text).replace(/\r/g,"").length; - return answer; - } else { - if (typeof(element.selectionStart) != undefined) { - if (win.getSelection && typeof(win.getSelection().rangeCount) != undefined && win.getSelection().rangeCount == 0) { - Assert.fail("There is no cursor on this page!"); - } - return element.selectionStart; - } - } - throw new Error("Couldn't detect cursor position on this browser!"); -} - - -Selenium.prototype.doSetContext = function(context, logLevelThreshold) { - /** - * Writes a message to the status bar and adds a note to the browser-side - * log. - * - *If logLevelThreshold is specified, set the threshold for logging - * to that level (debug, info, warn, error).
- * - *(Note that the browser-side logs will not be sent back to the - * server, and are invisible to the Client Driver.)
- * - * @param context - * the message to be sent to the browser - * @param logLevelThreshold one of "debug", "info", "warn", "error", sets the threshold for browser-side logging - */ - if (logLevelThreshold==null || logLevelThreshold=="") { - return this.page().setContext(context); - } - return this.page().setContext(context, logLevelThreshold); -}; - -Selenium.prototype.getExpression = function(expression) { - /** - * Returns the specified expression. - * - *This is useful because of JavaScript preprocessing. - * It is used to generate commands like assertExpression and storeExpression.
- * - * @param expression the value to return - * @return string the value passed in - */ - return expression; -} - -Selenium.prototype.doWaitForCondition = function(script, timeout) { - /** - * Runs the specified JavaScript snippet repeatedly until it evaluates to "true". - * The snippet may have multiple lines, but only the result of the last line - * will be considered. - * - *Note that, by default, the snippet will be run in the runner's test window, not in the window
- * of your application. To get the window of your application, you can use
- * the JavaScript snippet selenium.browserbot.getCurrentWindow()
, and then
- * run your JavaScript in there
Actions that require waiting include "open" and the "waitFor*" actions.
- * The default timeout is 30 seconds. - * @param timeout a timeout in milliseconds, after which the action will return with an error - */ - testLoop.waitForConditionTimeout = timeout; -} - -Selenium.prototype.doWaitForPageToLoad = function(timeout) { - /** - * Waits for a new page to load. - * - *You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc. - * (which are only available in the JS API).
- * - *Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded" - * flag when it first notices a page load. Running any other Selenium command after - * turns the flag to false. Hence, if you want to wait for a page to load, you must - * wait immediately after a Selenium command that caused a page-load.
- * @param timeout a timeout in milliseconds, after which this command will return with an error - */ - this.doWaitForCondition("selenium.browserbot.isNewPageLoaded()", timeout); -}; - -Selenium.prototype.doWaitForPageToLoad.dontCheckAlertsAndConfirms = true; - -/** - * Evaluate a parameter, performing JavaScript evaluation and variable substitution. - * If the string matches the pattern "javascript{ ... }", evaluate the string between the braces. - */ -Selenium.prototype.preprocessParameter = function(value) { - var match = value.match(/^javascript\{((.|\r?\n)+)\}$/); - if (match && match[1]) { - return eval(match[1]).toString(); - } - return this.replaceVariables(value); -}; - -/* - * Search through str and replace all variable references ${varName} with their - * value in storedVars. - */ -Selenium.prototype.replaceVariables = function(str) { - var stringResult = str; - - // Find all of the matching variable references - var match = stringResult.match(/\$\{\w+\}/g); - if (!match) { - return stringResult; - } - - // For each match, lookup the variable value, and replace if found - for (var i = 0; match && i < match.length; i++) { - var variable = match[i]; // The replacement variable, with ${} - var name = variable.substring(2, variable.length - 1); // The replacement variable without ${} - var replacement = storedVars[name]; - if (replacement != undefined) { - stringResult = stringResult.replace(variable, replacement); - } - } - return stringResult; -}; - - -/** - * Factory for creating "Option Locators". - * An OptionLocator is an object for dealing with Select options (e.g. for - * finding a specified option, or asserting that the selected option of - * Select element matches some condition. - * The type of locator returned by the factory depends on the locator string: - * label=result: | \n" + inputs["result"] + " | \n" + - "
totalTime: | \n" + inputs["totalTime"] + " | \n
numTestPasses: | \n" + inputs["numTestPasses"] + " | \n
numTestFailures: | \n" + inputs["numTestFailures"] + " | \n
numCommandPasses: | \n" + inputs["numCommandPasses"] + " | \n
numCommandFailures: | \n" + inputs["numCommandFailures"] + " | \n
numCommandErrors: | \n" + inputs["numCommandErrors"] + " | \n
" + inputs["suite"] + " | \n\n |
" + inputs["testTable." + rowNum] + " | \n\n |