-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(playwright): wait for disabled (#4412)
- Loading branch information
1 parent
7769c02
commit 03943c1
Showing
6 changed files
with
87 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Waits for element to become disabled (by default waits for 1sec). | ||
Element can be located by CSS or XPath. | ||
|
||
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator. | ||
@param {number} [sec=1] (optional) time in seconds to wait, 1 by default. | ||
@returns {void} automatically synchronized promise through #recorder |
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,21 @@ | ||
<html> | ||
<body> | ||
|
||
<input id="text" type="text" name="test" disabled="true" value="some text"> | ||
|
||
<button id="button" type="button" name="button1" disabled="true" value="first" onclick="updateMessage('button was clicked')">A Button</button> | ||
|
||
<div id="message"></div> | ||
|
||
<script> | ||
setTimeout(function () { | ||
document.querySelector('#text').disabled = false; | ||
document.querySelector('#button').disabled = false; | ||
}, 2000); | ||
function updateMessage(msg) { | ||
document.querySelector('#message').textContent = msg; | ||
} | ||
</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