- Docs
-
Capabilities
Puppeteer Capabilities Generator
Generate Puppeteer connection options for your automated tests. Choose your browser, device emulation and configuration options to get the exact code you need for your Puppeteer tests.
Allows you to customize the name of the test, as it will appear in the dashboard.
Group tests under the same build identifier for easy retrieval.
Run the test from a different geographical location.
Looking for more options? See all Puppeteer capabilities.
Copy
const puppeteer = require('puppeteer');
(async () => {
const capabilities = {
browserName: 'chrome',
browserVersion: 'latest',
platformName: 'Windows 11',
'tb:options': {
'key': process.env.TB_KEY,
'secret': process.env.TB_SECRET
}
}
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://cloud.testingbot.com/puppeteer?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`
});
const page = await browser.newPage();
await page.goto('https://testingbot.com');
// Your test code here
await browser.close();
})();