diff --git a/tests/openvidu-angular-web-tutorial.spec.js b/tests/openvidu-angular-web-tutorial.spec.js index e8c83928..0bdc82aa 100644 --- a/tests/openvidu-angular-web-tutorial.spec.js +++ b/tests/openvidu-angular-web-tutorial.spec.js @@ -26,7 +26,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Fill in the username field, click the join button, and wait for the session to become visible. await page1.fill('#userName', 'User1'); - await page1.click('#join input[type="submit"]'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); await page1.waitForTimeout(5000); diff --git a/tests/openvidu-getaroom-test.spec.js b/tests/openvidu-getaroom-test.spec.js index 3e5657b2..9869dafa 100644 --- a/tests/openvidu-getaroom-test.spec.js +++ b/tests/openvidu-getaroom-test.spec.js @@ -26,6 +26,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page1.waitForSelector('button.btn-success', { timeout: 10000 }); // Click the button with the 'onclick' attribute. + await page1.click('button.btn-success'); // Wait for the '#session' element to become visible and wait for 5 seconds. diff --git a/tests/openvidu-hello-world-test.spec.js b/tests/openvidu-hello-world-test.spec.js index b44a3dc8..82ac46cb 100644 --- a/tests/openvidu-hello-world-test.spec.js +++ b/tests/openvidu-hello-world-test.spec.js @@ -24,7 +24,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Interact with page1, such as clicking a button and waiting for a specific element to become visible, then wait for a timeout.. - await page1.click('#join input[type="submit"]'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); await page1.waitForTimeout(5000); diff --git a/tests/openvidu-iframe-tutorial.spec.js b/tests/openvidu-iframe-tutorial.spec.js index bc91ba8c..b2ad8883 100644 --- a/tests/openvidu-iframe-tutorial.spec.js +++ b/tests/openvidu-iframe-tutorial.spec.js @@ -27,7 +27,6 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a let iframeHandle = await page1.waitForSelector('iframe.openvidu-iframe'); let frame = await iframeHandle.contentFrame(); - // Click the "JOIN" button within the iframe and wait for the '#session' element to become visible. await frame.click('input[type="submit"]'); diff --git a/tests/openvidu-js-screen-share-tutorial.spec.js b/tests/openvidu-js-screen-share-tutorial.spec.js index 32a8cf8f..3fec69d9 100644 --- a/tests/openvidu-js-screen-share-tutorial.spec.js +++ b/tests/openvidu-js-screen-share-tutorial.spec.js @@ -24,7 +24,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Fill in the '#userName' field with 'Page1', click the 'JOIN' button, and wait for the '#session' element to become visible. await page1.fill('#userName', 'User1'); - await page1.click('#join input[type="submit"]'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); await page1.waitForTimeout(5000); diff --git a/tests/openvidu-js-web-tutorial.spec.js b/tests/openvidu-js-web-tutorial.spec.js index fe3807b6..082ab3c8 100644 --- a/tests/openvidu-js-web-tutorial.spec.js +++ b/tests/openvidu-js-web-tutorial.spec.js @@ -26,7 +26,10 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Fill in the '#userName' field with 'Page1', click the 'JOIN' button, and wait for the '#session' element to become visible. await page1.fill('#userName', 'User1'); - await page1.click('#join input[type="submit"]'); + + await page1.click('button.btn-success'); + + await page1.waitForSelector('#session', { visible: true }); await page1.waitForTimeout(5000); diff --git a/tests/openvidu-react-web-tutorial.spec.js b/tests/openvidu-react-web-tutorial.spec.js index 4d2bbe27..d4e3f01c 100644 --- a/tests/openvidu-react-web-tutorial.spec.js +++ b/tests/openvidu-react-web-tutorial.spec.js @@ -27,7 +27,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Fill in the '#userName' field with 'Page1', click the 'JOIN' button, and wait for the '#session' element to become visible. await page1.fill('#userName', 'User1'); - await page1.click('#join input[type="submit"]'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); await page1.waitForTimeout(5000); diff --git a/tests/openvidu-recording-java-tutorial.spec.js b/tests/openvidu-recording-java-tutorial.spec.js index 26b3c538..45657391 100644 --- a/tests/openvidu-recording-java-tutorial.spec.js +++ b/tests/openvidu-recording-java-tutorial.spec.js @@ -28,7 +28,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page1.goto('https://localhost:5000'); // Perform actions on the first page. - await page1.click('#join-btn'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); // Find video elements on the first page and verify there is exactly one. @@ -46,8 +46,8 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page2.waitForSelector('#session', { visible: true }); await page2.click('#buttonStartRecording'); await page2.click('#buttonGetRecording'); - await page2.waitForTimeout(5000); await page2.screenshot({ path: '../results/screenshots/page2_startrecording_screenshot.png' }); + await page2.waitForTimeout(5000); await page2.click('#buttonStopRecording'); await page2.click('#buttonGetRecording'); await page2.screenshot({ path: '../results/screenshots/page2_stoprecording_screenshot.png' }); diff --git a/tests/openvidu-recording-node-tutorial.spec.js b/tests/openvidu-recording-node-tutorial.spec.js index 6d9dbb1e..ffb7df57 100644 --- a/tests/openvidu-recording-node-tutorial.spec.js +++ b/tests/openvidu-recording-node-tutorial.spec.js @@ -28,7 +28,7 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a await page1.goto('http://localhost:5000'); // Perform actions on the first page. - await page1.click('#join-btn'); + await page1.click('button.btn-success'); await page1.waitForSelector('#session', { visible: true }); // Find video elements on the first page and verify there is exactly one. diff --git a/tests/openvidu-vue-tutorial.spec.js b/tests/openvidu-vue-tutorial.spec.js index 9b846069..245f6d88 100644 --- a/tests/openvidu-vue-tutorial.spec.js +++ b/tests/openvidu-vue-tutorial.spec.js @@ -22,10 +22,12 @@ test('Checking for the presence of two active webcams in an OpenVidu session', a // Navigate to a specific URL on page 1 and perform actions such as filling a text field and clicking a button. await page1.goto('http://localhost:8080'); await page1.fill('input[type="text"]', 'User1'); - await page1.click('button.btn.btn-lg.btn-success'); + await page1.click('button.btn-success'); + // Wait for a specific element to become visible. await page1.waitForSelector('#session', { visible: true }); - + await page1.waitForTimeout(5000); + // Find video elements on page 1 and verify there are exactly two of them. var videoElements = await page1.$$('video'); expect(videoElements.length).toEqual(2);