Skip to content

InnerBrowser raises "Undefined property: DOMDocument::$tagName" exception on invalid HTML #3783

Closed

Description

@ralbatross204

This is regarding my StackOverflow question http://stackoverflow.com/questions/40849755/codeception-i-clickbutton-text-results-in-errorexception-undefined-prop . The issue is solved, but I was asked to raise an issue here with a sample of HTML that causes the problem.

Here's the smallest chunk of HTML I found (the opening form tag is incorrectly inside the opening div):

URI: /badhtml

<html>
    <body>
        <div>
            <form>
        </div>
        <button>The Button</button>
        </form>
    </body>
</html>

Here's a corresponding test:

<?php
class TheCest {
    public function canClick($I) {
        $I->amOnPage('/badhtml');
        $I->click('The Button');
    }
}

Activity

  1. self-assigned this
    on Nov 29, 2016
  2. added a commit that references this issue on Dec 1, 2016
    bca52f1
  3. added a commit that references this issue on Dec 2, 2016
    a4c4dbe
  4. added a commit that references this issue on Jun 16, 2017
    83c3fb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions