element

Type: <string>
It captures the DOM element matching the given for the screenshot over the target url.
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://codepen.io/fossheim/full/oNjxrZa', {
  screenshot: { element: '#result-iframe-wrap' }
})

mql.render(data)
It will wait for the element to appear in the page and to be visible.