-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from alexandresalome/alert-messages
add acceptAlert() and dismissAlert()
- Loading branch information
Showing
11 changed files
with
322 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of PHP WebDriver Library. | ||
* (c) Alexandre Salomé <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace WebDriver\Exception; | ||
|
||
/** | ||
* @author Alexandre Salomé <[email protected]> | ||
*/ | ||
class NoAlertOpenErrorException extends \RuntimeException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Alert page</title> | ||
</head> | ||
<body> | ||
<h1>Alert tests</h1> | ||
<p >Feedback: <span id="alert-feedback">nothing</span></p> | ||
<div class="hover-wrapper"> | ||
<h2 class="title">Hover me</h2> | ||
<p class="content">You see this text because of hover</p> | ||
<p> | ||
<button id="reset" onclick="test_reset()">Reset</button> | ||
<button id="alert" onclick="test_alert()">Alert</button> | ||
<button id="confirm" onclick="test_confirm()">Confirm</button> | ||
<button id="prompt" onclick="test_prompt()">Prompt</button> | ||
</p> | ||
</div> | ||
<script type="text/javascript"> | ||
function test_reset() | ||
{ | ||
document.getElementById('alert-feedback').innerHTML = 'nothing'; | ||
} | ||
function test_alert() | ||
{ | ||
alert("ALERT!"); | ||
document.getElementById('alert-feedback').innerHTML = 'alerted'; | ||
} | ||
function test_prompt() | ||
{ | ||
val = prompt("PROMPT?"); | ||
console.log(val); | ||
if (null === val) { | ||
document.getElementById('alert-feedback').innerHTML = 'not answered'; | ||
} else { | ||
document.getElementById('alert-feedback').innerHTML = 'answered: ' + val; | ||
} | ||
} | ||
function test_confirm() | ||
{ | ||
if (confirm("CONFIRM?")) { | ||
document.getElementById('alert-feedback').innerHTML = 'confirmed'; | ||
} else { | ||
document.getElementById('alert-feedback').innerHTML = 'dismissed'; | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters