I am searching for a way to load the HTML body into selenium bot
html.body.innerHTML = .responseText
'
Set bot = New Selenium.ChromeDriver
bot.Get HERE
Is it possible to do such a task or I have to save the html body to a file then navigate to that file?
I could manage that by exporting the html body to a file using this procedure
Sub ExportHTML(sInput As String)
With CreateObject("ADODB.Stream")
.Charset = "UTF-8"
.Open
.WriteText sInput
.SaveToFile Environ("USERPROFILE") & "\Desktop\OutputHTML.html", 2
.Close
End With
End Sub
After that I could load the file using the selenium driver like that
bot.Get "file:///" & Environ("USERPROFILE") & "\Desktop\OutputHTML.html"
You can't load the HTML body seperately as the HTML Document in it's core form consists of two manadatory parts:
<head>
<body>
Example of a simple HTML document: