1 of 1 people found this helpful
I am not sure if JSDOM is going to provide enough functionality to do what you need to do but it looks like your HTML is incomplete. For example you define <body></body> element but it does not contain the placeholder for the embedded viz. You try getting the placeholder div element in:
var vizDiv = document.getElementById('tableau');
But that div does not exist. The first thing I might try it to take a working page to embed in your JSDOM variable because the lack of placeholder div might not be the only problem. But as I said I am not sure if JSDOM will work its has limitations. You might try a different approach. have you looked at Puppeteer?
The approach might be different in that you would create a working web page with your embedded content then drive that web page using Puppeteer.
Puppeteer is not easy but the advantage is that it is effectively a complete chrome browser.
Thanks, Robin. I'll try Puppeteer. At first glance it looks a little easier. I tried adding in the Tableau placeholder div but that didn't correct the issue.