小编L V*_*sad的帖子

如何让webdriver实例在所有类文件中使用相同的实例

我是java selenium的新手.

我想使用webdDrierSingleton概念,它将帮助我在所有类中使用单个驱动程序实例.

我无法获得驱动程序实例,有人可以指导我如何获取它.

singleton

3
推荐指数
1
解决办法
8122
查看次数

通过 jenkins 管道的 ssh 和 scp

我是詹金斯的新手,我试图使用 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)

ssh jenkins

3
推荐指数
1
解决办法
8651
查看次数

标签 统计

jenkins ×1

singleton ×1

ssh ×1