diff options
author | wei <> | 2005-12-10 11:49:29 +0000 |
---|---|---|
committer | wei <> | 2005-12-10 11:49:29 +0000 |
commit | 98215a603fb798cdb4178e49061977544aaa45b7 (patch) | |
tree | 282787037961f7466acbd174ce151cac6de71273 /tests/FunctionalTests/selenium/SeleniumLog.html | |
parent | 25f9c45261aafd65477ad526e0b6ad3dca80803a (diff) |
Initial import selenium functional test framework.
Diffstat (limited to 'tests/FunctionalTests/selenium/SeleniumLog.html')
-rw-r--r-- | tests/FunctionalTests/selenium/SeleniumLog.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/FunctionalTests/selenium/SeleniumLog.html b/tests/FunctionalTests/selenium/SeleniumLog.html new file mode 100644 index 00000000..01a5a9fe --- /dev/null +++ b/tests/FunctionalTests/selenium/SeleniumLog.html @@ -0,0 +1,61 @@ +<html> + +<head> +<title>Selenium Log Console</title> +<link id="cssLink" rel="stylesheet" href="selenium.css" /> + +</head> +<body id="logging-console"> + +<script language="JavaScript"> + +var logLevels = { + debug: 0, + info: 1, + warn: 2, + error: 3 +}; + +function getThresholdLevel() { + var buttons = document.getElementById('logLevelChooser').level; + for (var i = 0; i < buttons.length; i++) { + if (buttons[i].checked) { + return buttons[i].value; + } + } +} + +function append(message, logLevel) { + if (logLevels[logLevel] < logLevels[getThresholdLevel()]) { + return; + } + var log = document.getElementById('log'); + var newEntry = document.createElement('li'); + newEntry.className = logLevel; + newEntry.appendChild(document.createTextNode(message)); + log.appendChild(newEntry); + if (newEntry.scrollIntoView) { + newEntry.scrollIntoView(); + } +} + +</script> + +<div id="banner"> + <form id="logLevelChooser"> + <input id="level-error" type="radio" name="level" + value="error" /><label for="level-error">Error</label> + <input id="level-warn" type="radio" name="level" + value="warn" /><label for="level-warn">Warn</label> + <input id="level-info" type="radio" name="level" checked="yes" + value="info" /><label for="level-info">Info</label> + <input id="level-debug" type="radio" name="level" + value="debug" /><label for="level-debug">Debug</label> + </form> + <h1>Selenium Log Console</h1> +</div> + +<ul id="log"></ul> + +</body> +</html> |