I just started learning about typescript and I have been trying to create a promise that will select options from a drop down based on text input. However, my current approach doesn't seem to be working as expected:
case 'SelectFromList':
return new Promise( (resolve, reject) => {
this.retrieveElement(driverscr.getPageElementFromJson(screenName, fieldName)) // retrieveElement gets the page element.
.click()
.then(() => {
resolve();
})
.thenCatch( () => {
reject();
});
});