我是java selenium的新手.
我想使用webdDrierSingleton概念,它将帮助我在所有类中使用单个驱动程序实例.
我无法获得驱动程序实例,有人可以指导我如何获取它.
我是詹金斯的新手,我试图使用 withcredentials 和管道建立 ssh 连接。当我使用 ssh、easy2 ssh 等插件时,我能够连接到远程主机并执行任何 shell 命令。但要求是使用管道脚本,不幸的是出现错误。
代码:
pipeline {
agent any
stages {
stage('deploy app and reports') {
steps {
script {
withCredentials ([sshUserPrivateKey(credentialsId: 'oracle', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'oracle')]) {
def remote = [:]
remote.name = "friendly name"
remote.host = "ip address"
remote.allowAnyHosts = true
remote.user = 'prasad'
remote.identityFile = identity
sshCommand remote:remote, command: "ls -l"
sshCommand remote:remote, command: 'ls -l'
sshCommand remote:remote, command: 'pwd'
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
错误:
**java.lang.NoSuchMethodError: No …Run Code Online (Sandbox Code Playgroud)