To wait till element is displayed with Node Selenium WebDriver, we use the wait method.
For instance, we write
const el = await driver.findElement(By.id(`import-file-acqId:${acqId}`));
await driver.wait(until.elementIsVisible(el), 100);
await el.sendKeys(file);
to call findElement with By.id(import-file-acqId:${acqId}) to find the element by ID.
Then we call wait with until.elementIsVisible(el) to wait for the element.
The timeout is set to 100ms.
Then we call sendKeys to press a key.