Parcourir la source

调整代码为适应谷歌浏览器

‘xugp il y a 1 an
Parent
commit
2a92e34fb8

BIN
.gradle/7.4.2/checksums/checksums.lock


BIN
.gradle/7.4.2/checksums/md5-checksums.bin


BIN
.gradle/7.4.2/checksums/sha1-checksums.bin


+ 3 - 7
.idea/sonarlint/issuestore/index.pb

@@ -31,8 +31,6 @@ c
 3.idea/modules/report-fd/report-import.report-fd.iml,e\8\e86482e9a85513f9f00ccb33e11102ee2ac68445
 ?
 settings.gradle,0\5\05efc8b1657769a27696d478ded1e95f38737233
-C
-report/build.gradle,f\f\ff5de0b5e1199963025c70e58e75f4537dc9499d
 @
 report/README.md,3\8\38e19e53350eb86260ef7e1b0c9f917ec711268b
 n
@@ -53,8 +51,6 @@ l
 <report/src/main/java/com/gyee/wisdom/report/entity/User.java,7\f\7fde40d5b08f9b931c3a9bb867a99d3ce757e5d1
 x
 Hreport/src/main/java/com/gyee/wisdom/report/entity/WindpowerStation.java,a\9\a963b099295b37c86a6d45b237d73c92f9eca7d1
-v
-Freport/src/main/java/com/gyee/wisdom/report/service/ReportService.java,a\5\a56f55f3923cee68afb6fe001f7ab5ba684e4589
 ~
 Nreport/src/main/java/com/gyee/wisdom/report/service/SeleniumChromeService.java,0\c\0c84160983b56b5f333f4518fb9131c55ae45f33
 v
@@ -63,11 +59,11 @@ r
 Breport/src/main/java/com/gyee/wisdom/report/utils/ExcelExport.java,c\a\ca6a266935c0fe271cc5e0318020c7a33589d83d
 r
 Breport/src/main/java/com/gyee/wisdom/report/utils/ExcelImport.java,7\7\77bf6ea7ce7b52279ea06ff971948832d1816a1d
-p
-@report/src/main/java/com/gyee/wisdom/report/utils/ExcelUtil.java,f\f\ff2fea9669d2e8d4a894fa72ed19eb63c1440dae
 q
 Areport/src/main/java/com/gyee/wisdom/report/utils/ExcelUtils.java,8\9\89d4c269fc717ffc63dff891a32d56b3d8f3c97a
 o
 ?report/src/main/java/com/gyee/wisdom/report/utils/MD5Utils.java,c\c\cc22fdd8621317bd402d57a1919d7dddf214b66c
 v
-Freport/src/main/java/com/gyee/wisdom/report/utils/ResponseWrapper.java,d\2\d2d3f79aae40c77bddcf7a86020a96c9d8aae064
+Freport/src/main/java/com/gyee/wisdom/report/utils/ResponseWrapper.java,d\2\d2d3f79aae40c77bddcf7a86020a96c9d8aae064
+=
+
logs/warn.log,8\f\8fe50275b70c5074df36dc287d812346c5fe7019

+ 0 - 30
report/src/main/java/com/gyee/wisdom/report/controller/Test2Controller.java

@@ -1,30 +0,0 @@
-package com.gyee.wisdom.report.controller;
-
-import org.openqa.selenium.ie.InternetExplorerDriver;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * @author :mmzs
- * @date :Created in 2023/1/12 9:50
- * @description:
- * @modified By:
- * @version: $
- */
-public class Test2Controller {
-
-    public static void main(String[] args) {
-        // TODO Auto-generated method stub
-        //引用IE浏览器驱动
-        System.setProperty("webdriver.ie.driver", "D:\\gyee\\IEDriverServer.exe");
-        //创建IE浏览器对象
-        InternetExplorerDriver driver = new InternetExplorerDriver();
-        //浏览器最大化
-        driver.manage().window().maximize();
-        driver.manage().deleteAllCookies();
-        //等待浏览器加载完毕
-        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
-        //打开网址
-        driver.get("https://www.baidu.com/");
-    }
-}

+ 0 - 45
report/src/main/java/com/gyee/wisdom/report/controller/TestController.java

@@ -1,45 +0,0 @@
-package com.gyee.wisdom.report.controller;
-
-
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.chrome.ChromeDriver;
-
-import java.time.Duration;
-
-public class TestController {
-
-    private final static String driver = "webdriver.chrome.driver";
-    //定义本地谷歌浏览器驱动包地址
-    private final static String chromeDriver = "C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe";
-
-    public static void main(String[] args) {
-        try {
-            System.out.println("打开浏览器进行操作");
-            System.setProperty(driver,chromeDriver);
-            //获取控制 打开浏览器
-            WebDriver driver = new ChromeDriver();
-            driver.manage().window().maximize();//浏览器最大化
-            //超时等待30秒
-            Duration duration = Duration.ofSeconds(30);
-            driver.manage().timeouts().implicitlyWait(duration);
-            //跳转到百度浏览器
-            driver.get("http://www.baidu.com/");
-            //操作浏览器 获取到输入框
-            WebElement kk = driver.findElement(By.id("kw"));
-            //然后向百度输入框输入selenium java
-            kk.sendKeys("selenium");
-            //通过元素属性id=su找到百度一下搜索按钮
-            WebElement btn = driver.findElement(By.id("su"));
-            //对按钮进行点击操作
-            btn.click();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-
-
-    }
-
-
-}