![]() Now, let’s check out these examples : Puppeteer examples : 1.Visit a website : The first basic thing is to visit a website with Puppeteer. Puppeteer.launch().then(async browser => ) Īwait page.waitForSelector('#genesis-content > article > header > h1') Īwait page.focus('#wpcf7-f97-p311-o1 > form > p:nth-child(2) > label > span > input')Īwait ('PuppeteerBot') Īwait page.focus('#wpcf7-f97-p311-o1 > form > p:nth-child(3) > label > span > input')Īwait page.focus('#wpcf7-f97-p311-o1 > form > p:nth-child(4) > label > span > textarea')Īwait page.keyboard. Puppeteer is a project from the Google Chrome team which enables us to control a Chrome (or any other Chrome DevTools Protocol based browser) and execute common actions, much like in a real browser - programmatically, through a decent API. You want to learn what is Puppeteer and how to install it Check the end of this post. Running tests with WebDriverIO and Puppeteer WebDriverIO is a popular test automation framework with built-int support for both Selenium WebDriver and Puppeteer (Chrome DevTools protocol). The first basic thing is to visit a website with Puppeteer. This example will open a new browser with Puppeteer, navigate to the TestingBot homepage and verify if the title is correct.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |