diff --git a/cypress/e2e/test-nextcloud.cy.js b/cypress/e2e/test-nextcloud.cy.js
index 8834ebd22c3dd02fa9465e378c272216304f42cd..39939c4866dd6c7ceaf547e27c966c7c3d043830 100644
--- a/cypress/e2e/test-nextcloud.cy.js
+++ b/cypress/e2e/test-nextcloud.cy.js
@@ -55,10 +55,10 @@ describe('Test nextcloud', () => {
 
     // Create a new OO document with a random file name
     cy.visit('apps/files')
-    cy.get('.new').click()
+    cy.contains('button', 'New').click()
     const file_rand = 'test-' + Math.random().toString(16).substr(2, 12)
-    cy.get('[data-action=template-new-onlyoffice-1]').click().type(file_rand)
-    cy.get('.icon-confirm').click()
+    cy.contains('button', 'New document').click().type(file_rand)
+    cy.contains('button', 'Create').click()
 
     // Test Onlyoffice
     cy.frameLoaded('#onlyofficeFrame')