Better tab closing instructions

This commit is contained in:
Johannes Zellner 2023-06-22 21:09:28 +02:00
parent bf5ec0eae5
commit c91051c145

View file

@ -12,11 +12,14 @@ require('chromedriver');
const execSync = require('child_process').execSync,
expect = require('expect.js'),
readlinePromises = require('readline/promises'),
path = require('path'),
util = require('util'),
{ Builder, By, Key, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome');
const rl = readlinePromises.createInterface({ input: process.stdin, output: process.stdout });
if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
console.log('USERNAME, EMAIL and PASSWORD env vars need to be set');
process.exit(1);
@ -93,8 +96,8 @@ describe('Application life cycle test', function () {
await waitForElement(By.xpath('//a[contains(text(), "Configure my instance")]'));
await browser.findElement(By.xpath('//a[contains(text(), "Configure my instance")]')).click(); // this opens a new window
console.log('Close the newly opened tab. Will wait for 60 seconds');
await browser.sleep(60000);
execSync('spd-say "Close the newly opened configuration tab."');
await rl.question('Is tab closed? ');
}
async function uploadVideo() {