Skip to content

(playwright) href inconsistent #3170

@aschmidtwork

Description

@aschmidtwork

What are you trying to achieve?

as "/team" works in css selector (and is actually the value in rendered html), it should also work in attribute check:

Scenario('this should work, but doesnt', ({ I }) => {
    I.amOnPage('https://github.com/codeceptjs/CodeceptJS/');
    I.seeAttributesOnElements({
        css:'a[href="https://github.com/team"]'},{
        href: "/team"
    });
});

What do you get instead?

expected all elements ([object Object]) to have attributes {"href":"/team"} "0" to equal "1"

Details

  • CodeceptJS version: v3.0.7 (docker image codeceptjs/codeceptjs from today)
  • Configuration file:
exports.config = {
    tests: './test_*.js',
    bootstrap: false,
    helpers: {
        Playwright : {
            url: "https://github.com",
            restart: false,
            waitForNavigation: "domcontentloaded",
            waitForAction: 500,
            show: false,
        }
    },
}

PS. the test works if you add the whole url in attribute test value, and as a workaround, is there a way to get the config helper url in above href attribute check?

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