TimeTrex/vendor/phpunit/phpunit-selenium/selenium-1-tests/html/test_verify_alert.html

45 lines
1.3 KiB
HTML

<!--
Copyright 2004 ThoughtWorks, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<script type="text/javascript">
function generateAnAlert() {
alert("Store Below 494 degrees K!");
}
function generateTwoAlerts() {
alert("Store Below 220 degrees C!");
alert("Store Below 429 degrees F!");
}
function generateAnAlertBeforeLeaving() {
alert("I'm Melting! I'm Melting!");
document.location = "test_dummy_page.html";
}
</script>
</head>
<body>
<button id="oneAlert" onclick="javascript:generateAnAlert();"> click to generate one alert</button>
<br>
<button id="twoAlerts" onclick="javascript:generateTwoAlerts();"> click to generate two alerts</button>
<br>
<button id="alertAndLeave" onclick="javascript:generateAnAlertBeforeLeaving();"> click to generate an alert before navigating to new page</button>
</body>
</html>