It does not matter if I try type or fill on the element using the playwright inspector console, it shows the error as below:
playwright.$("//app-date-picker[@formcontrolname='myDate']//input").fill('a2');
VM51594:1 Uncaught TypeError: playwright.$(...).fill is not a function
at <anonymous>:1:72
However, if I run the type method from my Playwright Java code, it runs without error:
Locator birthDateField = page.locator("//app-date-picker[@formcontrolname='myDate']//input");
birthDateField.fill("");
What can cause the difference and why it is not working with the fill method in playwright inspector? The selector is correct, only the fill method is problematic somehow.