package com.ruoyi.abuwx.controller.exam;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;


import java.util.Optional;

public class NetworkPacketCapture {
    public static void main(String[] args) {
        // 设置Chrome驱动路径
        System.setProperty("webdriver.chrome.driver", "path/to/chromedriver");

        // 启动Chrome浏览器
        ChromeOptions options = new ChromeOptions();
        WebDriver driver = new ChromeDriver(options);

        // 导航到页面
        driver.get("http://www.example.com");

        System.out.println(driver.getTitle());

        // ... 执行其他操作 ...

        // 关闭浏览器
        driver.quit();
    }
}