From 4524e35858439bd04a3eafea94edb45096b88b9f Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 6 Jan 2020 16:29:07 -0600 Subject: [PATCH 1/2] Update InteractsWithElements.php cast boolean value to their appropriate string integer value. --- src/Concerns/InteractsWithElements.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Concerns/InteractsWithElements.php b/src/Concerns/InteractsWithElements.php index a5c53649c..e6b474f72 100644 --- a/src/Concerns/InteractsWithElements.php +++ b/src/Concerns/InteractsWithElements.php @@ -187,6 +187,11 @@ public function select($field, $value = null) if (is_null($value)) { $options[array_rand($options)]->click(); } else { + + if (is_bool($value)) { + $value = $value ? '1' : '0'; + } + foreach ($options as $option) { if ((string) $option->getAttribute('value') === (string) $value) { $option->click(); From 3a0213adbb5dc3005ba0f792158ba3bb8143837d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 7 Jan 2020 08:15:01 -0600 Subject: [PATCH 2/2] Update InteractsWithElements.php --- src/Concerns/InteractsWithElements.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Concerns/InteractsWithElements.php b/src/Concerns/InteractsWithElements.php index e6b474f72..45c608e58 100644 --- a/src/Concerns/InteractsWithElements.php +++ b/src/Concerns/InteractsWithElements.php @@ -187,7 +187,6 @@ public function select($field, $value = null) if (is_null($value)) { $options[array_rand($options)]->click(); } else { - if (is_bool($value)) { $value = $value ? '1' : '0'; }