Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mink strips out : #777

Open
Ghostff opened this issue Jun 14, 2019 · 8 comments
Open

Mink strips out : #777

Ghostff opened this issue Jun 14, 2019 · 8 comments

Comments

@Ghostff
Copy link

Ghostff commented Jun 14, 2019

Mink is striping out : from string example:
And I fill in "time" with "10:10" is filled out with 1010
also

When I fill in the following:
    | description  | Some random: test description  |

Is filled out with Some random test description

@stof
Copy link
Member

stof commented Jun 17, 2019

Is the stripping done by Mink, by Behat of my something between them ? Please provide a reproducer using Mink directly.

@stof
Copy link
Member

stof commented Jun 17, 2019

Also, which Mink driver are you using ?

@Ghostff
Copy link
Author

Ghostff commented Jun 17, 2019

"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?

@Ghostff
Copy link
Author

Ghostff commented Jun 18, 2019

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}';");
}

@stof
Copy link
Member

stof commented Jun 19, 2019

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

@Ghostff
Copy link
Author

Ghostff commented Jun 19, 2019

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"

@stof
Copy link
Member

stof commented Jun 19, 2019

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.

@Ghostff
Copy link
Author

Ghostff commented Jun 21, 2019

selenium2 the scenarios use @javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants