使用 Jenkins Active Choices Reactive References 插件上传文件

问题描述 投票:0回答:2

我正在使用 Jenkins Active Choice 插件。我想提供一个基于引用变量的文件上传功能 当我选择参考参数 scan_type 作为漏洞-Web 时,以下设置允许我输入文本 enter image description here

我想要的是,它应该上传文件,而不是接受文本输入,并且文件的内容应该分配给SELENIUM_RECORDED_FILE

我尝试使用下面的groovy

if (scan_type.equals("Vulnerability-Web")) {
inputBox = "<body> <form action='upload.php' method='post' enctype='multipart/form-data'> Select file to upload: <input type='file' name='fileToUpload' id='fileToUpload'> </form>"
return inputBox
}

添加文件上传选项,但文件内容未存储在SELENIUM_RECORDED_FILE中

enter image description here

请让我知道我们如何才能实现这一目标

jenkins devops jenkins-groovy
2个回答
0
投票

读过这里,看起来你一定有

<input type="file" name="file">


0
投票

任何人都有解决方案,这似乎不起作用

© www.soinside.com 2019 - 2024. All rights reserved.