|
@@ -1,5 +1,6 @@
|
|
|
package cn.cslg.pas.novelty;
|
|
|
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
import org.openqa.selenium.By;
|
|
|
import org.openqa.selenium.WebDriver;
|
|
|
import org.openqa.selenium.WebElement;
|
|
@@ -7,6 +8,7 @@ import org.openqa.selenium.chrome.ChromeDriver;
|
|
|
import org.openqa.selenium.chrome.ChromeOptions;
|
|
|
import org.openqa.selenium.support.ui.ExpectedCondition;
|
|
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
|
import java.io.FileInputStream;
|
|
@@ -20,8 +22,34 @@ 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;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void test() {
|
|
|
+ Map<String, String> map = dynamicCaseInfo("1524");
|
|
|
+ System.out.println(map);
|
|
|
+ }
|
|
|
|
|
|
- public static Map<String, String> dynamicCaseInfo(String caseNo) {
|
|
|
+ public Map<String, String> dynamicCaseInfo(String caseNo) {
|
|
|
Properties properties = new Properties();
|
|
|
try {
|
|
|
properties.load(new FileInputStream("path/to/your/config.properties"));
|