客户端之前不能使用idea调试,因为路径不对,修改了一下,现在调试和start_service.cmd都能正常运行了
将System.getProperty("user.dir")替换成RunService.APPLICATION_HOME,
This commit is contained in:
parent
2246e416f2
commit
b8fcb50f66
|
@ -14,6 +14,8 @@ import org.openqa.selenium.firefox.FirefoxOptions;
|
|||
import org.openqa.selenium.ie.InternetExplorerDriver;
|
||||
|
||||
import luckyclient.utils.LogUtil;
|
||||
import springboot.RunService;
|
||||
|
||||
|
||||
/**
|
||||
* =================================================================
|
||||
|
@ -37,8 +39,7 @@ public class WebDriverInitialization{
|
|||
*/
|
||||
public static WebDriver setWebDriverForTask(int drivertype) throws WebDriverException,IOException{
|
||||
// 参数为空
|
||||
File directory = new File("");
|
||||
String drivenpath=directory.getCanonicalPath()+File.separator+"BrowserDriven"+File.separator;
|
||||
String drivenpath= RunService.APPLICATION_HOME + File.separator+"BrowserDriven"+File.separator;
|
||||
WebDriver webDriver = null;
|
||||
LogUtil.APP.info("准备初始化WebDriver对象...检查到当前操作系统是:{}",OS);
|
||||
if(drivertype==0){
|
||||
|
|
Loading…
Reference in New Issue