Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Checkbox check doesn't work with value #239

Open
gimler opened this issue Apr 7, 2016 · 2 comments
Open

Checkbox check doesn't work with value #239

gimler opened this issue Apr 7, 2016 · 2 comments

Comments

@gimler
Copy link
Contributor

gimler commented Apr 7, 2016

The following doesn't work with goutte and selenium2 driver

Feature: checkbox

  Scenario: checkbox check
    Given I am on "http://127.0.0.1:8080/form.html"

    And the "fuuu" checkbox should be checked # id works
    And the "foo" checkbox should be checked # name works
    And the "Label" checkbox should be checked # label works
    And the "bar" checkbox should be checked # value failed

see also minkphp/MinkGoutteDriver#74

composer.json

{
    "require": {
        "behat/behat": "3.1.*",
        "behat/mink": "1.7.1",
        "behat/mink-extension": "2.2",
        "behat/mink-goutte-driver": "1.2.1"
    },
    "config": {
        "bin-dir": "bin/"
    }
}

html

<html>
<head>
</head>
<body>
<form action="#">

    <label for="fuuu">Label</label>
    <input type="checkbox" id="fuuu" name="foo" value="bar" checked>

    <input type="submit" value="send">

</form>
</body>
</html>

behat.yml

default:
    extensions:
        Behat\MinkExtension: 
            base_url: 'http://127.0.0.1'
            show_cmd: 'firefox %s'
            default_session: http
            javascript_session: javascript
            sessions:
                http:
                    goutte:
                        guzzle_parameters:
                            verify: false
                javascript:
                    selenium2:
                        wd_host: "http://localhost:8643/wd/hub"
        Sanpi\Behatch\Extension: ~

    suites:
        default:
            contexts:
                - FeatureContext
                - Behat\MinkExtension\Context\MinkContext
                - behatch:browser

run with php -S 127.0.0.1:8080

@stevenkroiher
Copy link

👍

@Kris1992
Copy link

I had the same problem.

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

No branches or pull requests

3 participants