Skip to main content
Once connected to a Cloud Browser session, you control it entirely through your automation library (Puppeteer or Playwright). Gologin does not provide built-in action methods — all browser interactions are standard library calls.
Puppeteer
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
console.log(await page.title());
console.log(page.url());
Playwright
await page.goto('https://example.com', wait_until='domcontentloaded')
print(await page.title())
print(page.url)

Clicking and typing

Puppeteer
await page.click('#search-input');
await page.type('#search-input', 'hello world');
await page.click('#submit-button');
Playwright
await page.click('#search-input')
await page.type('#search-input', 'hello world')
await page.click('#submit-button')

Waiting for elements

Puppeteer
await page.waitForSelector('.results', { timeout: 5000 });
Playwright
await page.wait_for_selector('.results', timeout=5000)

Extracting text

Puppeteer
const text = await page.$eval('.price', el => el.innerText);
Playwright
text = await page.locator('.price').inner_text()

Taking a screenshot

Puppeteer
await page.screenshot({ path: 'screenshot.png' });
Playwright
await page.screenshot(path='screenshot.png')

Working with multiple pages

Puppeteer
const page2 = await browser.newPage();
await page2.goto('https://example.com/other');
Playwright
page2 = await browser.new_page()
await page2.goto('https://example.com/other')