From ab0670b67aa578be5151aa5e4ef91339b2a1a635 Mon Sep 17 00:00:00 2001 From: Stefan Neuser Date: Sun, 22 Nov 2015 13:32:55 +0100 Subject: [PATCH 1/2] fix select method issue with duplicate option values --- src/Extensions/Selenium.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Extensions/Selenium.php b/src/Extensions/Selenium.php index 5fd668d..0d535b5 100644 --- a/src/Extensions/Selenium.php +++ b/src/Extensions/Selenium.php @@ -236,13 +236,13 @@ public function tick($element) /** * Select an option from a dropdown. * - * @param string $element * @param string $option + * @param string $element * @return static */ - public function select($element, $option) + public function select($option, $element) { - $this->findByValue($option, 'option')->click(); + $this->findByValue($option, "select[name=$element] > option")->click(); return $this; } From 17605ae52136a2129bc68f147b5a15d5d38e2618 Mon Sep 17 00:00:00 2001 From: Stefan Neuser Date: Tue, 24 Nov 2015 10:42:16 +0100 Subject: [PATCH 2/2] reorder method parameteres --- src/Extensions/Selenium.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extensions/Selenium.php b/src/Extensions/Selenium.php index 0d535b5..0e6e9b0 100644 --- a/src/Extensions/Selenium.php +++ b/src/Extensions/Selenium.php @@ -240,7 +240,7 @@ public function tick($element) * @param string $element * @return static */ - public function select($option, $element) + public function select($element, $option) { $this->findByValue($option, "select[name=$element] > option")->click();