From 8245125349961ef0f2c35f91b10633f3ab0ae812 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 22 Nov 2013 20:05:17 +0100 Subject: [PATCH] Don't rely on Behat/Selenium returning 'value' for textarea Technically a textarea DOM node doesn't have a 'value' attribute, but rather a HTML content. This used to work, but likely broke either by updated browser handling or updated selenium logic. Fixes "Scenario: I can edit title and content and see the changes on draft" --- .../SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php b/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php index e6cccdf27..a47e0861d 100644 --- a/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php +++ b/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php @@ -92,7 +92,7 @@ class CmsFormsContext extends BehatContext { $element = $page->findField($locator); assertNotNull($element, sprintf('HTML field "%s" not found', $locator)); - $actual = $element->getAttribute('value'); + $actual = $element->getHTML(); $regex = '/'.preg_quote($html, '/').'/ui'; if (!preg_match($regex, $actual)) { $message = sprintf(