1 year ago
#328467
Donnerhorn
Playwright can't fill numbers only inputs
I'm testing a chromium playwright script on a shopping site. I have an issue with an input that accepts only numbers. If letters are added the input ignores them. The problem is here that playwright with its default fill:
page.locator("input xpath adress").fill('12.15')
Doesn't send numbers, although the string is made of numbers which selenium does if strings are given in send.keys.
I first thought that Playwright skips the input box. I discovered that this is the issue by testing keyboard number typing, so things like:
page.keyboard.press('Digit5')
Are accepted. What can I do to solve this problem?
python
browser-automation
playwright
0 Answers
Your Answer