The code now:
await page.type('#filterdataTable > div.widget > input', "1234");
Can I use XPath instead of this CSS Selector?
You can use page.$x()
to obtain the ElementHandle
of the element you want to select.
Then you can use elementHandle.type()
to type text into the input
field.
const example = await page.$x('//*[@id="filterdataTable"]/div[contains(concat(" ", normalize-space(@class), " "), " widget ")]/input');
await example[0].type('1234');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With