//package jj.tech.paolu.utils.playwright;
//
//import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
//
//import org.springframework.stereotype.Component;
//
//import com.microsoft.playwright.Browser;
//import com.microsoft.playwright.BrowserType;
//import com.microsoft.playwright.Locator;
//import com.microsoft.playwright.Page;
//import com.microsoft.playwright.Playwright;
//import com.microsoft.playwright.options.AriaRole;
//
//import jakarta.annotation.PostConstruct;
//import jakarta.annotation.PreDestroy;
//@Component
//public class Hgt8 {
//	public Playwright playwright;
//	public Browser browser;
//	public Page page;
//	
//	@PostConstruct
//    public void start() throws Exception {
//		this.playwright = Playwright.create();
//	    this.browser = playwright.chromium().launch(
//	    		new BrowserType.LaunchOptions().setHeadless(false)
//	    );
//	    page = browser.newPage();
//    }
//
//    @PreDestroy
//    public void stop() {
//    	page.close();
//        browser.close();
//        playwright.close();
//        System.out.println("Hgt8 is close");
//    }
//	
//	
//	public static void main(String[] args) {
//        try {
//        	Playwright playwright = Playwright.create();
//            Browser browser = playwright.chromium().launch(
//            		new BrowserType.LaunchOptions().setHeadless(false)
//            		);
//            Page page = browser.newPage();
////            page.navigate("https://sse8.idc9998.com");
//            page.navigate("https://sol8.idc9998.com");
//            
//
//            // Expect a title "to contain" a substring.
//            
//
//            // create a locator
//            Locator getStarted = page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Get Started"));
//
//            // Expect an attribute "to be strictly equal" to the value.
////            assertThat(getStarted).hasAttribute("href", "/docs/intro");
//
//            // Click the get started link.
////            getStarted.click();
//            
////            assertThat(browser.close()).hasAttribute("href", "/docs/intro");
//            
////            page.pause();
//
//            // Expects page to have a heading with the name of Installation.
////            assertThat(page.getByRole(AriaRole.HEADING,
////               new Page.GetByRoleOptions().setName("Installation"))).isVisible();
//            page.close();
//            browser.close();
//            playwright.close();
//            
//            
//        }catch (Exception e) {
//			// TODO: handle exception
//		}
//    }
//
//}
