我正在使用 Jenkins Active Choice 插件。我想提供一个基于引用变量的文件上传功能 当我选择参考参数 scan_type 作为漏洞-Web 时,以下设置允许我输入文本
我想要的是,它应该上传文件,而不是接受文本输入,并且文件的内容应该分配给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中
请让我知道我们如何才能实现这一目标