它看起来像java.io.File.(File,String)依赖于JDK版本.代码示例在Windows 10上运行.
代码示例:
public static void main(String... args) {
String path = "C:\\Workspace\\project";
File file = null;
for (String part : path.split("\\\\")) {
file = new File(file, part);
}
System.out.println(file);
// prints "C:Workspace\project" for JDK 9+
// prints "C:\Workspace\project" for JDK 8
}
Run Code Online (Sandbox Code Playgroud)
您能否解决该案件的任何已知问题或解决方案
我正在使用Vividus工具进行 Web UI 测试似乎无法检测到已安装Chrome的正确版本;我有版本 83.0.4103.61 的 Chrome 和 io.github.bonigarcia.wdm.WebDriverManager 报告检测到版本 81,结果测试没有开始。
日志
io.github.bonigarcia.wdm.WebDriverManager - Using chromedriver 81.0.xxxxx.xx (since Chrome 81 is installed in your machine)
Run Code Online (Sandbox Code Playgroud)
2020-05-27 17:20:25,179 [batch-1-thread-1] INFO org.vividus.bdd.log.LoggingStoryReporter - Given I am on the main application page (FAILED)
(org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 81
Build info: version: '4.0.0-alpha-1', revision: 'd1d3728cae', time: '2019-04-24T13:42:21'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13'
Driver info: driver.version: ChromeDriver …Run Code Online (Sandbox Code Playgroud) 我正在使用 Vividus 工具进行测试。我知道 Vividus 使用 Gradle 作为构建系统来测试项目。我应该选择哪种 Vividus 版本使用策略?
我相信有几个:
1. 使用最新的发布版本
2. 使用最新的 Vividus 可用,尽管快照或发布
还有其他人吗?如何应用这些策略?
哪些数据库支持 Vividus 工具,应该如何处理数据库?
我正在使用Vividus来测试我的应用程序。
单击下载按钮后,如何测试文件是否已下载?