英文:
Automate certificate uploads into Plesk (using Selenium-IDE) not working
问题
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
!
这里是要自动化上传更新的证书到不同的 Plesk
环境,通过设置一个 Selenium-IDE
脚本。到目前为止,一切都正常,除了脚本的上传部分。我理解我需要以某种方式将文件发送到 input
字段,但是不知道如何定位那个没有 id
的 input
字段!
This is what the page looks like; it is the middle "Upload .pem file" button that one would use to upload the file.
这是页面的样子;这是中间的 "上传 .pem 文件" 按钮,用于上传文件。
Maybe there is a way to target the accept=".pem"
section, which is unique on the page.
也许有一种方法可以定位页面上唯一的 accept=".pem"
部分。
Clicking on the button records:
command: click target: css=.ext-sslit-certificate-dropzone .pul-button__inner > span > span
单击按钮记录:
命令:单击 目标: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
选择我的 .pem
文件记录:
命令:输入 目标:css=.ext-sslit-certificate-dropzone 值:C:\fakepath\wildcard___my_domain_name.pem
But playing it back it is stuck and not inserting the text into the "browse 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/
该文件被上传到一个 URL:
https://plesk.cc:8443/modules/sslit/index.php/index/upload/
I tried different things, but can't get it to work.
我尝试了不同的方法,但无法使其工作。
(And, why is my file location getting renamed with C:\fakepath\
?)
(还有,为什么我的文件位置被重命名为 C:\fakepath\
?)
英文:
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\
?)
答案1
得分: 0
我发现UI.Vision提供了XType
功能,但卡在那里就像之前一样; 我的UI.Vision支持论坛帖子链接 ...
我用UI.Vision让它工作了。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论