CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

(playwright) href inconsistent

Open aschmidtwork opened this issue 4 years ago • 0 comments

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="/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?

aschmidtwork avatar Dec 14 '21 13:12 aschmidtwork