Skip to content

Commit

Permalink
Fix unicode support in slowly send keys methods (#907)
Browse files Browse the repository at this point in the history
Replace str_split with preg_split for support unicode
  • Loading branch information
overlord-space authored Jul 14, 2021
1 parent 6978f33 commit d44ebcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/InteractsWithElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function append($field, $value)
*/
public function appendSlowly($field, $value, $pause = 100)
{
foreach (str_split($value) as $char) {
foreach (preg_split('//u', $value, -1, PREG_SPLIT_NO_EMPTY) as $char) {
$this->append($field, $char)->pause($pause);
}

Expand Down

0 comments on commit d44ebcb

Please sign in to comment.