小编SMP*_*MPH的帖子

在IntelliJ IDEA中更改sbt项目的常春藤缓存位置?

我在IntelliJ 13.0.2中使用Scala项目获得了0.13.2.

我只是想改变我的默认../.ivy2/cache路径.

我试图../bin/sbt在SBT安装中更改以下条目

-Dsbt.ivy.home=D:/IvyHome/.ivy
Run Code Online (Sandbox Code Playgroud)

但没有运气.

在此输入图像描述

即使在IDE中我也找不到要更新的地方 SBT_HOME

什么是解决方案?

在此输入图像描述

scala intellij-idea sbt

14
推荐指数
1
解决办法
1万
查看次数

会话未在Protractor中为chrome创建例外

尝试针对chrome运行Protractor测试时,我得到以下错误.

我的承诺

import {Config} from 'protractor'

export let config: Config = {
    framework: 'jasmine',
    // capabilities: { browserName: 'chrome'},
    multiCapabilities: [
        // {browserName: 'firefox'},
        {
            browserName: 'chrome',
            chromeOptions: {
                args: ['--start-maximized']
            },

        }],

    seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
    seleniumPort: null,
    seleniumArgs: [],
    specs: [
        './Protractor/Login/*.spec.js',
Run Code Online (Sandbox Code Playgroud)

错误:

Protractor conf.js
[17:19:07] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[17:19:07] I/launcher - Running 1 instances of WebDriver
[17:19:09] E/launcher - session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"8800.1","isDefault":true},"id":1,"name":"","origin":"://"}
  (Session info: chrome=54.0.2840.59) …
Run Code Online (Sandbox Code Playgroud)

selenium-chromedriver selenium-webdriver typescript protractor

10
推荐指数
2
解决办法
3万
查看次数

通过 launchSettings.json 设置环境变量。在测试项目中

我正在尝试在 IDE 中使用 VS2019 针对真实环境运行端到端测试。这些测试位于主解决方案内的单独测试项目中。

所以我尝试使用以下两种方法加载环境变量:

方法一

launchSettings.json测试项目中的更新

{
  "profiles": {
    "My.Endpoint.Tests": {
      "commandName": "Project",
      "environmentVariables": {
        "ServerName": "Apim"

      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

方法二

创建以下 cmd 文件并将其添加到项目中,然后Build Events - Pre-build event command-line:在测试项目属性中调用相同的文件。

set ServerName=Apim
Run Code Online (Sandbox Code Playgroud)

不幸的是,在执行测试时,上述方法都无法读取给定的环境变量VS2019 IDE

asp.net-core

9
推荐指数
0
解决办法
3470
查看次数

Docker Windows 10安装错误组件CommunityInstaller.ExecAction失败:进程InstallerCli.exe退出

尝试安装适用于 Windows 4.0.0 的 Docker Desktop 时出现以下错误

Component CommunityInstaller.ExecAction failed: Process InstallerCli.exe exited with code 1
   at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
Run Code Online (Sandbox Code Playgroud)

3.6.0也尝试过较低版本( ),但结果相同。

有人有什么想法吗?

windows-10 docker-desktop

9
推荐指数
2
解决办法
5762
查看次数

没有方法签名:适用于Groovy中的参数类型错误

在运行以下方法时,我对groovy很新,并且遇到以下错误.我正在尝试传递xml文件名和Map

RD.groovy

    Given(~'^input currency "([^"]*)"$') { String baseCurr ->
     fromCurr = baseCurr
}
When(~'^insert end Currency "([^"]*)"$') { String tragetCurr ->
     toCurr = tragetCurr
}


Then(~'^get the expected end currency value "([^"]*)"$') { String result ->

    assert result == currCon(fromCurr, toCurr)


}

private currCon(fromCurr, toCurr)
{

    def binding = ["fromCurr": fromCurr, "toCurr": toCurr]
    response = Consumer.currConvert("request/CurrencyConvert.xml",binding)    --> This is line 119

    assert 200 == response.status
    return response.data.ConversionRateResult.toString()
}
Run Code Online (Sandbox Code Playgroud)

ClassA.groovy

    package abc.api.member

import abc.util.Log
import abc.util.TemplateUtil
import groovyx.net.http.ContentType
import abc.api.RestClient


class …
Run Code Online (Sandbox Code Playgroud)

groovy cucumber gradle

8
推荐指数
1
解决办法
7万
查看次数

使用groovy在IntelliJ IDE中运行Cucumber Geb测试时出错

我在IntelliJ IDE中运行Geb测试时遇到以下错误.

org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: features.step_definitions.MyHomeStepDef.to() is applicable for argument types: (java.lang.Class) values: [class geb.pages.MyLandingPage]
Possible solutions: is(java.lang.Object), run(), run(), any(), any(groovy.lang.Closure), with(groovy.lang.Closure)
  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97)
  at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
  at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
  at groovy.lang.Closure.call(Closure.java:415)
  at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:133)
  at cucumber.runtime.groovy.GroovyStepDefinition.execute(GroovyStepDefinition.java:48)
  at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:45)
  at cucumber.runtime.Runtime.runStep(Runtime.java:248)
  ...
  at cucumber.cli.Main.main(Main.java:12)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
  at ?.Given I am on the My home page(D:\MyFolder\src\test\resources\features\my-login-page.feature:5)
Caused by: groovy.lang.MissingMethodException: No signature of method: features.step_definitions.MyHomeStepDef.to() is applicable for argument types: (java.lang.Class) values: [class geb.pages.MyLandingPage] …
Run Code Online (Sandbox Code Playgroud)

groovy intellij-idea junit4 geb cucumber-jvm

5
推荐指数
1
解决办法
1059
查看次数

Excel VBA中的替换函数用于单元格范围

我必须在excel文件中用另一个字符替换一个字符.

我使用了以下replace功能,但由于某些单元格中超过1024个字符限制,它会停在那里.

Sub Replace()

    With Sheets("Sheet1").Range("A1:A629")   

      .Cells.Replace ",", ";", xlPart, xlByRows, False

    End With

End Sub 
Run Code Online (Sandbox Code Playgroud)

我知道Substitute功能会怎么做

Cells(1, 2) = "=SUBSTITUTE(A1,"","","";"")"
Run Code Online (Sandbox Code Playgroud)

但是我如何将其用于细胞范围.

谢谢

excel vba excel-vba

4
推荐指数
2
解决办法
7万
查看次数

由于黄瓜步骤语法,无法在gradle中生成测试报告

当我尝试在命令行中运行测试时,我收到以下错误消息.

测试基于Geb,Selenium和Cucumber/Groovy.

Caused by: org.gradle.api.GradleException: Could not generate test report to 'D:\Folder\ABCD\Auto\build\reports\tests'.
        at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.generateFiles(DefaultTestReport.java:84)
        at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.generateReport(DefaultTestReport.java:48)
        at org.gradle.api.tasks.testing.Test.executeTests(Test.java:482)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:530)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:513)
Run Code Online (Sandbox Code Playgroud)

添加了更多错误详情:

Caused by: java.io.FileNotFoundException: D:\Folder\ABCD\Auto\build\reports\tests\packages\When I enter valid registration details "d2bcons" and "fi rstdtwob" and "lastdtwob" and "d2bcons@trashcanmail.html (The filename, directory name, or volume label syntax is incorrect) 
Run Code Online (Sandbox Code Playgroud)

什么可能导致错误?

谢谢

cucumber gradle geb selenium-webdriver

4
推荐指数
2
解决办法
2220
查看次数

量角器中的ExpectedConditions未定义

我是量角器的新手,使用量角器 Version 4.0.2

但是,当我有下面的代码时,我得到错误的protractor关键字

   import { browser } from 'protractor/globals';

   let EC =  protractor.ExpectedConditions;
Run Code Online (Sandbox Code Playgroud)

错误:

[ts] 
Cannot find name 'protractor'.
Run Code Online (Sandbox Code Playgroud)

我需要在这里专门导入任何东西吗?

此外,我尝试'预期条件'在类型'typeof量角器'上不存在.虽然没有运气.

typescript protractor

4
推荐指数
1
解决办法
2184
查看次数

如何在Geb中添加日志记录

我正在使用Geb和Gradle/Groovy/Selenium Cucumber.

如何在通过终端运行时登录控制台.即使我可以println在groovy代码中使用语句,那些不会在控制台中打印出来.

谢谢

groovy cucumber geb selenium-webdriver

2
推荐指数
1
解决办法
2238
查看次数