Implementing headless IE11 testing with TrifleJS in Visual Studio 2019

Hey everyone! I’m running UI tests in my Azure DevOps pipeline. Chrome and Firefox work fine in headless mode, but I’m stuck with IE11. I heard TrifleJS might help, but I’m not sure how to set it up in Visual Studio 2019. Anyone got experience with this?

I’m using Windows Server 2019 Datacenter and need to test on IE11. It’d be awesome if someone could share some C# code or point me in the right direction. I’ve been googling but haven’t found a clear solution yet.

Has anyone successfully used TrifleJS for headless IE testing? What were the main steps? Any gotchas to watch out for? Thanks in advance for any help!

I’ve worked with TrifleJS for IE11 headless testing in Visual Studio 2019, and it can be a bit finicky. First, make sure you’ve got the latest TrifleJS NuGet package installed. In your test setup, you’ll need to configure the TrifleJS driver with IE11 settings. Something like:

var options = new TrifleOptions();
options.AddArgument(“–emulate-ie”, “11”);
var driver = new TrifleDriver(options);

Keep in mind that TrifleJS doesn’t fully replicate IE11, so you might encounter some JavaScript compatibility issues, especially with more modern web features. It’s a good stopgap solution, but consider gradually moving away from IE11 testing if possible, as Microsoft has ended support for it.

I’ve dabbled with TrifleJS for IE11 headless testing in our CI/CD pipeline, and it’s a decent workaround. Here’s what worked for me:

Install TrifleJS via NuGet in your Visual Studio project, set up a custom WebDriver for TrifleJS (configuring it to emulate IE11), and then modify your test code to use this custom driver instead of the regular IE one.

One major gotcha: TrifleJS doesn’t perfectly mimic IE11, especially with newer web technologies. We had to tweak our tests a bit to account for these differences.

Also, ensure your Azure DevOps agent has the necessary dependencies installed. We ran into issues there initially.

Overall, it’s a workable solution, but as others have mentioned, consider phasing out IE11 testing if possible. It’s becoming increasingly obsolete in the modern web landscape.

hey jack, triflejs work with ie testing, albeit a tad tricky. you need nuget install and config file setup then start using triflejs driver. but watch out for js issues with modern stuff. wish u luck!