我收到错误java.io.FileNotFoundException“

时间:2018-07-13 09:40:43

标签: java selenium selenium-webdriver build-automation

我分享我的github网址

https://github.com/jino555/Keyword_framework/tree/master/src/config

请看看

完全错误

log4j:WARN No appenders could be found for logger (utility.Log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.io.FileNotFoundException: D:\Tools QA Projects\trunk\Hybrid KeyWord Driven\src\config\OR.txt (The system cannot find the path specified)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at executionEngine.DriverScript.main(DriverScript.java:39)

1 个答案:

答案 0 :(得分:0)

尝试替换:

D:\Tools QA Projects\trunk\Hybrid KeyWord Driven\src\config\OR.txt

具有:

D:\Tools\QA Projects\trunk\Hybrid KeyWord Driven\src\main\java\config\OR.txt

我相信ToolsQA Projects是diffrenet文件夹。同样在您的gitHub存储库中显示的preject结构如下:

...\src\main\java\config\OR.txt

而不是

...\src\config\OR.txt

所以问题出在您提供的文件的路径上。我们找不到适合您的路径,因为我们不知道您的项目在本地存储在哪里。