In my web application i have an attachment button which browses files from the local computer and selecting any file from that results in uploading that file as an attachment, Can we Automate scenarios which include attaching a file from the local computer using TestCafe in Node js.
import PageModel from './page';
fixture`Getting Started` .page`https://devexpress.github.io/testcafe/example`;
test('My first test', async t => {
await t
.setFilesToUpload('#upload-input', [
'./upload/abc.pdf',
])
// No Upload button present
// the file uploads automaticaly as soon as we click open button in file browsing window
await t.click(Selector('#Button1').find('i').withText("save"))
});