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

fix(fill): throw when the element isn't fillable #160

Merged
merged 2 commits into from
Dec 9, 2019
Merged

fix(fill): throw when the element isn't fillable #160

merged 2 commits into from
Dec 9, 2019

Conversation

JoelEinbinder
Copy link
Contributor

An element is fillable if its:

  • In dom
  • Not display:none or visibility:hidden
  • textarea or input or contenteditable

if textarea or input it must also be

  • not readOnly
  • not disabled

#133

await page.goto(server.PREFIX + '/input/textarea.html');
await page.$eval('input', i => i.style.display = 'none');
await page.fill({selector: 'input', visible: false}, 'some value');
expect(await page.evaluate(() => result)).toBe('');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was testing the wrong behavior

@JoelEinbinder JoelEinbinder merged commit e3f34bd into microsoft:master Dec 9, 2019
@JoelEinbinder JoelEinbinder deleted the focus_boolean branch December 9, 2019 22:51
sand4rt pushed a commit to sand4rt/playwright that referenced this pull request Dec 21, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants