Every line of 'puppeteer check if element exists' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
54 public async waitForSelector(selector: string) { 55 return this.page.waitForSelector(selector) 56 }
22 public async click(element: ElementHandle): Promise { 23 await element.click(); 24 }
270 isExisting(selector) { 271 const locator = this.by.css(selector); 272 return this.browser.element(locator).isPresent(); 273 }
50 public async click(selector: string) { 51 return this.page.click(selector) 52 }
108 public async waitFor(selector: string | EvaluateFn, options?: WaitForSelectorOptions, ...args: Array): Promise { 109 await this.page.waitFor(selector, options, ...args); 110 }
30 async function click(selector: string, options?: puppeteer.ClickOptions) { 31 await page.click(selector, options) 32 }
20 function doesElementExist(selector: string): boolean { 21 return fixture.debugElement.queryAll(By.css(selector)).length > 0; 22 }
15 wait(elem) { 16 browser.waitForExist(elem); 17 }
10 elementTagExists(tag : string) { 11 return element(by.tagName(tag)).isPresent(); 12 }
247 function elementByCssExists(selector, delay = 2000) { 248 return driver.waitForElementByCss(selector, delay) 249 .should.eventually.exist; 250 }