Open Ghostff opened 5 years ago
Is the stripping done by Mink, by Behat of my something between them ? Please provide a reproducer using Mink directly.
Also, which Mink driver are you using ?
"behat/behat": "^3.5",
"behat/mink-extension": "^2.3",
"behat/mink": "^1.7",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.3"
"Please provide a reproducer using Mink directly" sorry how do i do this?
I dont know the actual cause if this, but this is what am using temporally
/**
* Fills in form field with specified id|name|label|value
* Example: When I fill in "time" with raw "10:10"
*
* @When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with raw "(?P<value>(?:[^"]|\\")*)"$/
* @param string $field
* @param string $value
*/
public function fillRaw(string $field, string $value)
{
$this->getSession()->evaluateScript("document.getElementsByName('{$field}')[0].value = '{$value}';");
}
have a look at the functional testsuite of drivers (available at https://github.com/minkphp/driver-testsuite). This gives lots of examples of using Mink directly (to remove any effect coming from other layers).
And you still haven't told us which driver you are using
behat.yml
default:
autoload:
'': tests/behat/bootstrap
suites:
default:
paths:
features: "%paths.base%/tests/behat/"
contexts:
- BehatContexts\FeatureContext
extensions:
Behat\MinkExtension:
base_url: https://www.wikipedia.org/
browser_name: chrome
goutte: ~
selenium2:
wd_host: http://127.0.0.1:4444/wd/hub
browser: chrome
capabilities:
chrome:
switches:
- "--window-size=1920,1080"
this config creates 2 Mink sessions, one using GoutteDriver and one using Selenium2Driver. This does not tell me which one is used for your issue.
selenium2 the scenarios use @javascript
Mink is striping out
:
from string example:And I fill in "time" with "10:10"
is filled out with1010
alsoIs filled out with
Some random test description