Skip to content

elementHasChildrenCount ignores child_selector #31

@curiosity26

Description

@curiosity26

When attempting to use elementHasChildrenCount with a child selector, the value of child_selector is undefined inside the execute() function.

Steps to recreate:

The issues comes when trying to select a deep child from a parent:

<div id="parent">
    <div>
        <div class="target_child">Child 1</div>
        <div class="target_child">Child 2</div>
    </div>
</div>

Then in your test, try the following:

{
 // ...

    "Child count should be valid": browser => {
          browser.assert.elementHasChildrenCount("#parent", 2, ".target_child");
         // FAILS with count of 1
    },

// ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions