Skip to main content

findElement()

Wait for and capture an element by querySelector

ParameterTypeDescription
privateDocumentstringspecify the document to search from. This is usually document
querySelectorstringquerySelector string to find the element. Works identical to document.querySelectorAll
timeOut?numberreject the function return promise if the time to find this element surpases timeOut
  • type method
  • returns Promise<HTMLElement[]>