From 6ad4ab743ec7f7df6862bdfa8d6bce445575e2d5 Mon Sep 17 00:00:00 2001 From: yiGmMk Date: Fri, 10 Jun 2022 18:29:00 +0800 Subject: [PATCH] alter tests --- chromedp/chromedp_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/chromedp/chromedp_test.go b/chromedp/chromedp_test.go index 069b675..e6cf112 100644 --- a/chromedp/chromedp_test.go +++ b/chromedp/chromedp_test.go @@ -1,6 +1,7 @@ package chromedptool import ( + "log" "os" "testing" ) @@ -8,8 +9,16 @@ import ( func TestPrintf(t *testing.T) { path := "./baidu.pdf" defer os.RemoveAll(path) + h := ChromedpHandler{} - err := ChromedpHandler{}.GenPdf("https://baidu.com", path) + url, err := h.GetConnUrl() + if err != nil { + log.Println(err) + return + } + log.Println(url) + + err = h.GenPdf("https://baidu.com", path) if err != nil { t.Error(err) }