automate tests for search filters and search results sorting

This commit is contained in:
Adina Parpalita
2020-01-05 19:00:19 +02:00
parent 03bb0b139f
commit e27a517ad7
9 changed files with 869 additions and 94 deletions

View File

@@ -92,6 +92,13 @@ export class Utils {
}
}
static async clearFieldWithBackspace(elem: ElementFinder): Promise<void> {
const text = await elem.getAttribute('value');
for (let i = 0; i < text.length; i++) {
await elem.sendKeys(protractor.Key.BACK_SPACE);
}
}
static async fileExistsOnOS(fileName: string, folderName: string = '', subFolderName: string = '') {
const config = await browser.getProcessedConfig();
const filePath = path.join(config.params.downloadFolder, folderName, subFolderName, fileName);