Feeling a bit rusty at the moment;
I have a few promises remaining that require access to a previous class, and I am striving to find the most elegant solution. Utilizing webdriverJS, this should cover all aspects of the driver... Thank you for your assistance!
class funManeger
async fillOutDForm ( ){
try{
let that = this;
await driver.findElement( this.elementKeys.D ).clear();
await driver.findElement( this.elementKeys.D ).sendKeys(this.search.D);
await driver.wait(
webdriver.until.elementLocated(
this.elementKeys.DDropDown
),2250, // timeOut
'Could not find item in DropDown Item' //error message on timeout
).then( async function ( currentContext){
try {
await driver.sleep( this.getRandomInt(7) * 100 );
await driver.findElement( this.elementKeys.DDropDown ).click();
} catch (error) {
console.log( 'error clicking on D DropDown', this.elementKeys.DDropDown, error );
}
});
}catch (error){
console.log('Error Filling out D', error );
}
}