-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
– to simulate ctrl+a or cmd+a on mac
- Loading branch information
Showing
4 changed files
with
53 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from selene import have, command | ||
import time | ||
|
||
from selene.core.exceptions import TimeoutException | ||
|
||
from tests.integration.helpers.givenpage import GivenPage | ||
|
||
|
||
def test_select_all_allows_to_overwrite_text_via_type(session_browser): | ||
browser = session_browser.with_(timeout=1) | ||
browser.config.hold_driver_at_exit = True | ||
page = GivenPage(browser.driver) | ||
page.opened_with_body( | ||
''' | ||
<input id="text-field" value="old text"></input> | ||
''' | ||
) | ||
|
||
browser.element('#text-field').perform(command.select_all).type('new text') | ||
|
||
browser.element('#text-field').should(have.value('new text')) |