I would like to automate the uploading of renewed certificates into different Plesk
environments, by setting up a Selenium-IDE
script. All is working so far, except for the upload part of the script. I understand that I somehow need to send the file to the input
field, but would not know how to target that input
field without the id
-- it has no id
!
This is what the page looks like; it is the middle "Upload .pem file" button that one would use to upload the file.
The code of the middle section "Upload .pem file" is:
<div class="ext-sslit-certificate-dropzone" style="position: relative;" multiply="false" aria-disabled="false">
<button class="pul-button" type="button" data-test-id="ext-sslit__certificate-upload-button">
<span class="pul-button__inner">
<span>
<span>Upload .pem file</span>
</span>
</span>
</button>
<input accept=".pem" type="file"
style="position: absolute; inset: 0px; opacity: 0.00001; pointer-events: none;"
multiple="" autocomplete="off">
</div>
Maybe there is a way to target the accept=".pem"
section, which is unique on the page.
Clicking on the button records:
command: click
target: css=.ext-sslit-certificate-dropzone .pul-button__inner > span > span
Selecting my .pem
file records:
command: type
target: css=.ext-sslit-certificate-dropzone
value: C:\fakepath\wildcard___my_domain_name.pem
But playing it back it is stuck and not inserting the text into the "brows to file window" of the file I selected.
The file gets posted to a URL:
https://plesk.cc:8443/modules/sslit/index.php/index/upload/
I tired different things, but can't get it to work.
(And, why is my file location getting renamed with C:\fakepath\
?)
I found that UI.Vision offers XType
functionality, but got stuck there just as much; link to my post on UI.Vision's support forum ...
I got it working using UI.Vision.