|
@@ -22,26 +22,12 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@SpringBootTest
|
|
|
public class GetReportInfoFromWDTest {
|
|
|
-// IPEasySetting:
|
|
|
-// DownloadFileSavePath: F:\file
|
|
|
-// isHeadless: true
|
|
|
-// Account: zhuliu
|
|
|
-// Password: cCv51b
|
|
|
-// ChromeDriverPath: C:\Program Files\Google\Chrome\Application\chrome.exe
|
|
|
-// IPEasyWeb: http://47.106.94.35/index.aspx
|
|
|
-//
|
|
|
-// @Value("${IPEasySetting.DownloadFileSavePath}")
|
|
|
-// private String strFileSavePath;
|
|
|
-// @Value("${IPEasySetting.isHeadless}")
|
|
|
-// private boolean isHeadless;
|
|
|
-// @Value("${IPEasySetting.Account}")
|
|
|
-// private String account;
|
|
|
-// @Value("${IPEasySetting.Password}")
|
|
|
-// private String password;
|
|
|
-// @Value("${IPEasySetting.ChromeDriverPath}")
|
|
|
-// private String chromeDriverPath;
|
|
|
-// @Value("${IPEasySetting.IPEasyWeb}")
|
|
|
-// private String iPEasyWeb;
|
|
|
+ private static String strFileSavePath = "F:\\file";
|
|
|
+ private static boolean isHeadless = true;
|
|
|
+ private static String account = "zhuliu";
|
|
|
+ private static String password = "cCv51b";
|
|
|
+ private static String chromeDriverPath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
|
|
+ private static String iPEasyWeb = "http://47.106.94.35/index.aspx";
|
|
|
|
|
|
@Test
|
|
|
public void test() {
|
|
@@ -50,20 +36,20 @@ public class GetReportInfoFromWDTest {
|
|
|
}
|
|
|
|
|
|
public Map<String, String> dynamicCaseInfo(String caseNo) {
|
|
|
- Properties properties = new Properties();
|
|
|
- try {
|
|
|
- properties.load(new FileInputStream("path/to/your/config.properties"));
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- throw new RuntimeException("Failed to load configuration properties");
|
|
|
- }
|
|
|
-
|
|
|
- String strFileSavePath = properties.getProperty("IPEasySetting.DownloadFileSavePath");
|
|
|
- boolean isHeadless = Boolean.parseBoolean(properties.getProperty("IPEasySetting.isHeadless"));
|
|
|
- String account = properties.getProperty("IPEasySetting.Account");
|
|
|
- String password = properties.getProperty("IPEasySetting.Password");
|
|
|
- String chromeDriverPath = properties.getProperty("IPEasySetting.ChromeDriverPath");
|
|
|
- String iPEasyWeb = properties.getProperty("IPEasySetting.IPEasyWeb");
|
|
|
+// Properties properties = new Properties();
|
|
|
+// try {
|
|
|
+// properties.load(new FileInputStream("path/to/your/config.properties"));
|
|
|
+// } catch (IOException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// throw new RuntimeException("Failed to load configuration properties");
|
|
|
+// }
|
|
|
+//
|
|
|
+// String strFileSavePath = properties.getProperty("IPEasySetting.DownloadFileSavePath");
|
|
|
+// boolean isHeadless = Boolean.parseBoolean(properties.getProperty("IPEasySetting.isHeadless"));
|
|
|
+// String account = properties.getProperty("IPEasySetting.Account");
|
|
|
+// String password = properties.getProperty("IPEasySetting.Password");
|
|
|
+// String chromeDriverPath = properties.getProperty("IPEasySetting.ChromeDriverPath");
|
|
|
+// String iPEasyWeb = properties.getProperty("IPEasySetting.IPEasyWeb");
|
|
|
|
|
|
ChromeOptions options = new ChromeOptions();
|
|
|
options.addArguments("user-data-dir=" + strFileSavePath);
|