We are trying to upload file using TestCafe code, but its not uploading the file. There's no IFrame. The input control is inside simple div>label structure
Kindly suggest. Thanks
<div>
<label>
<div>..svg stuff..</div>
<input aria-label="Upload an image" tabindex="0" type="file" multiple="" accept="image/jpeg, image/png" data-testid="imageInputTest" class="ImageInputstyles__Input-sc-7878w-7 aosVy">
</label>
</div>
Code snippet:
fixture `Example`
.page `https://ourURL.com/YOUR PATH/`;
test('Upload Files test', async t => { await t .setFilesToUpload('.dx-fileuploader-input', 'path/to/file_to_be_uploaded/on/your/machine' ]); });
We also checked that- its not uploading to the server. More ref: https://devexpress.github.io/testcafe/documentation/reference/test-api/testcontroller/setfilestoupload.html
Aucun commentaire:
Enregistrer un commentaire