Skip to content

Object of class Symfony\Component\DomCrawler\Crawler could not be converted to string #75

@mgrechanik

Description

@mgrechanik

Hi.
I am writing a functional test.
For html

<button type="submit" class="btn btn-success" name="start_game" value="yes">Start new game</button>

my test code

$I->seeInField(['name' => 'start_game'], 'yes');

produce this error.

Digging into your code I found that I was not supposed to try it with button input.
And this line of your library has mistake. $nodes is an object which has no __toString(), it cannot be inserted into string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions