Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] codegen: do not use select's innerText for selector #5190

Closed
rmallof opened this issue Dec 23, 2020 · 2 comments
Closed

[BUG] codegen: do not use select's innerText for selector #5190

rmallof opened this issue Dec 23, 2020 · 2 comments
Assignees

Comments

@rmallof
Copy link

rmallof commented Dec 23, 2020

Hi,

When a form select / dropdown list changes the DOM depending on the choosen option, for example adding a new field in the form, the code selecting the option is not recorded

Running the command:
playwright-cli -b ff --lang "en" codegen https://sforce.co/34AHdU4
And choosing "United States" as the "Country" field will trigger this behavior, dumping the following into the logs:

pw:api => frame.selectOption started +5s
pw:api waiting for selector "//div[starts-with(normalize-space(.), '  Sign up now to start your free trial. First name Enter your first name Last na')]" +1ms
pw:api selector resolved to visible <div class="col text-left col-xs-12 col-sm-6 col-md-…>… +19ms
pw:api <= frame.selectOption failed +6ms

Versions:
Windows 10 Pro 20H2

playwright-cli --version
Version 0.170.0

node --version
v15.4.0

Thanks!

@dgozman dgozman transferred this issue from microsoft/playwright-cli Jan 27, 2021
@dgozman
Copy link
Contributor

dgozman commented Jan 27, 2021

This is because generated selector contains the dump of all selector options in this case. We should fix that.

@dgozman dgozman added the P2-bug label Jan 27, 2021
@dgozman dgozman changed the title Codegen does not record action when DOM changes - select fields [BUG] codegen: do not use select's innerText for selector Jan 27, 2021
@dgozman dgozman self-assigned this Jan 27, 2021
@dgozman
Copy link
Contributor

dgozman commented Feb 19, 2021

This will be fixed in the next v1.9 release.

@dgozman dgozman closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants