Sub qwe()
Dim driver As New ChromeDriver, post As Object
With driver
.AddArgument "--headless" ''This is the fix
.Get "http://news.mtime.com"
End With
For Each post In driver.FindElementByClass("newscontent").FindElementsByTag("h4")
Debug.Print (post.Text)
Next post
End Sub
来源:oschina
链接:https://my.oschina.net/u/4330611/blog/4713066