microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.69k stars 3.58k forks source link

page.selectOption: Unknown engine "name" while parsing selector name="serviceType" [BUG] #5615

Closed qabrain closed 3 years ago

qabrain commented 3 years ago

Context:

Command: npx folio .\xxx\xxx\ --param browserName=chromium --param headful

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

//select service type
async serviceType_select(serviceTypeToSelect: string) {
    return await this.page.selectOption('name="serviceType"', serviceTypeToSelect)
}

Or, without inner quotes:

//select service type
async serviceType_select(serviceTypeToSelect: string) {
    return await this.page.selectOption('name=serviceType', serviceTypeToSelect)
}

Describe the bug

selectOption works fine with an id selector, but not with name attribute selector.

aslushnikov commented 3 years ago

@dcleve333 there's no name= selector. We currently support only a handful of attribute selectors:

We have docs regarding this, but I admit they're not clear. Let us fix them!