summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/selenium/selenium-api.js
diff options
context:
space:
mode:
authorwei <>2006-05-31 04:26:21 +0000
committerwei <>2006-05-31 04:26:21 +0000
commit3ac04dd9cbb3c14fb2522793b2268b910837d8c4 (patch)
tree1300309ca4ac08378a51adf4112dfec2db0f15eb /tests/FunctionalTests/selenium/selenium-api.js
parent652bffab24bab354d9e3022b22866640f4fd4a0e (diff)
Update selenium javascript, now runs in Safari!
Diffstat (limited to 'tests/FunctionalTests/selenium/selenium-api.js')
-rw-r--r--tests/FunctionalTests/selenium/selenium-api.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/FunctionalTests/selenium/selenium-api.js b/tests/FunctionalTests/selenium/selenium-api.js
index 5d73e0fd..ddaf4699 100644
--- a/tests/FunctionalTests/selenium/selenium-api.js
+++ b/tests/FunctionalTests/selenium/selenium-api.js
@@ -411,8 +411,16 @@ Selenium.prototype.assertNotVisible = function(locator) {
};
Selenium.prototype.isVisible = function(element) {
- var visibility = this.getEffectiveStyleProperty(element, "visibility");
- var isDisplayed = this.isDisplayed(element);
+ if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+ {
+ var visibility = element.style["visibility"];
+ var isDisplayed = element.style["display"] != "none";
+ }
+ else
+ {
+ var visibility = this.getEffectiveStyleProperty(element, "visibility");
+ var isDisplayed = this.isDisplayed(element);
+ }
return (visibility != "hidden" && isDisplayed);
};