Introducing: Headless IE

Anderson Martínez
Anderson Martínez
/
April 1, 2022

At Browserless, we're always busy bringing you (if not designing ourselves) the latest state-of-the-art tech on headless browsers and scraping. We encompass virtually all aspects of web automation, putting ourselves in the cutting edge of these technologies. But we thought to ourselves What about the oldies?. It's really not crazy when you think about it: devs will usually have to maintain legacy code, we sometimes have to used dated technologies, other times we're attached to a specific library version, etc. So, we took this thought as a challenge, a challenge we not only succeeded in, but also absolutely dominated. So, here is where we introduce to you: Headless Internet Explorer.

Headless Internet Explorer

It took us some time to figure out how to the things right in this case. It was really challenging. But you can finally run IE headless. And the good news is that it's as clean as it sounds! Take a look at this basic screenshot code:


const puppeteer = require("puppeteer");
const pptrIE = require("puppeteer-explorer");

pptrIE.use(puppeteer);

(async () => {
  await pptrIE.connect("http://ie.browserless.io");
  await pptrIE.browserCreator( async creator => {
    await creator.getCandidates( candidates => {
      candidates.openInternetExplorer( async iExplorer => {
        await iExplorer.openNewPage( async page => {
          await page.clickNavigationBar(async (context) => {
            await context.browser.navigationBar.clickInput(async (input) => {
              await input.write("http://example.com", async (input) => {
                await input.pressKey("Return", async (page) => {
                  await page.takeScreenshotAndSaveItOnDiskAs(
                    "C:/Users/Browserless/Images/screenshot.BMP"
                  );
                });
              });
            });
          });
        })
      })
    })
  })
})();

Slick, isn't it?

There are some thing to consider the first being those http calls. You may notice that they aren't HTTPs. Sadly, IE doesn't really SSL certificates very good, and this is the cleanest way to do it. You might also have noticed that we're saving the screenshot in BMP format. That's because IE can only save them that way.

This image runs over a Windows Vista SP2 OS, and comes with batteries included! bundled with Microsoft Silverlight, Pre-configured to run Java Applets , and Adobe Shockwave so you can hack from the get go. But be fast! this image is only going to be around for some time. And if you're reading this on April Fools day, you're in luck! Only for today April the first 2020, if you add a new IE worker to your account, we're including the costs of a psychiatric therapist for your meltdowns!

Share this article

Ready to try the benefits of Browserless?

Sign Up