From a6be5564823be40670e0cad8dc758557dbd37549 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 24 Jun 2006 05:46:22 +0000 Subject: Update active controls. --- tests/FunctionalTests/selenium/prado-functional-test.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/FunctionalTests/selenium') diff --git a/tests/FunctionalTests/selenium/prado-functional-test.js b/tests/FunctionalTests/selenium/prado-functional-test.js index f9889a72..306f6a74 100644 --- a/tests/FunctionalTests/selenium/prado-functional-test.js +++ b/tests/FunctionalTests/selenium/prado-functional-test.js @@ -39,7 +39,21 @@ Selenium.prototype._isDisplayed = function(element) { return true; }; - +Selenium.prototype.assertEmptySelection = function(selectLocator, optionLocator) +{ + /** + * Verifies that the selected option of a drop-down satisfies the optionSpecifier. + * + *
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); + return element.selectedIndex == -1; +} + function runNextTest() { if (!runAllTests) return; -- cgit v1.2.3