I am facing a challenge with my application where I have multiple instances of Plupload on one page, divided into 3 categories. These instances can be manually added by inserting a new table row. Testing the dynamic uploading functionality using Codeception has proven to be difficult as there is no straightforward way to attach a file to a specific Plupload file input due to the unknown generated id and the inability to add a specific css class.
To retrieve the id of the current Plupload file input, I attempted the following:
init: {
Init: function(up) {
console.log(up.id); // o_1aa1e71ku20lole1v7s1veqetje0
console.log(up.runtime); // html
}
}
The issue arises when up.id does not match the id of the file input:
<input id="html5_1aa1e71krlg119o9ks61uvl17ledv" type="file" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" accept="image/jpeg,image/png,image/gif,application/pdf">
I am seeking assistance in how to obtain the id in order to apply a custom css class based on the section it belongs to, or if there is an alternative method to target a specific dynamically added Plupload input using Codeception?