summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/selenium/prado-functional-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/selenium/prado-functional-test.js')
-rw-r--r--tests/FunctionalTests/selenium/prado-functional-test.js16
1 files changed, 15 insertions, 1 deletions
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.
+ *
+ * <p>See the select command for more information about option locators.</p>
+ *
+ * @param selectLocator an <a href="#locators">element locator</a> 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;