SeleniumConfig.java
685 Bytes
package com.canrd.webmagic.config;
import com.canrd.webmagic.processor.config.Agent;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author: xms
* @description: TODO
* @date: 2024/4/26 14:37
* @version: 1.0
*/
@Configuration
public class SeleniumConfig {
@Bean
public WebDriver webDriver() {
System.setProperty("webdriver.chrome.driver", "D:\\chrome\\chromedriver-win64\\chromedriver-win64\\chromedriver.exe");
return new ChromeDriver();
}
}