diff --git a/test/integration/test.js b/test/integration/test.js
index 86729cf277017b5cb99f9b858514633583564d47..8cb23329d09cbb932f953dfa9f04468f1a758408 100644
--- a/test/integration/test.js
+++ b/test/integration/test.js
@@ -37,6 +37,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Blocks report when clicked in the toolbox', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Blocks');
         await clickText('Operators', blocksTabScope);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
@@ -48,6 +49,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Switching sprites updates the block menus', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Sound', blocksTabScope);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
         // "meow" sound block should be visible
@@ -61,6 +63,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Adding a costume', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Costumes');
         await clickText('Add Costume');
         const el = await findByXpath("//input[@placeholder='what are you looking for?']");
@@ -74,6 +77,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Adding a sound', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Sounds');
         await clickText('Add Sound');
         const el = await findByXpath("//input[@placeholder='what are you looking for?']");
@@ -100,6 +104,7 @@ describe('costumes, sounds and variables', () => {
     test('Load a project by ID', async () => {
         const projectId = '96708228';
         await driver.get(`file://${uri}#${projectId}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await new Promise(resolve => setTimeout(resolve, 2000));
         await clickXpath('//img[@title="Go"]');
         await new Promise(resolve => setTimeout(resolve, 2000));
@@ -110,6 +115,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Creating variables', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Blocks');
         await clickText('Data', blocksTabScope);
         await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
@@ -134,6 +140,7 @@ describe('costumes, sounds and variables', () => {
 
     test('Importing extensions', async () => {
         await driver.get(`file://${uri}`);
+        await driver.executeScript('window.onbeforeunload = undefined;');
         await clickText('Blocks');
         await clickText('Extensions');
         await clickText('Pen', modalScope); // Modal closes