Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › browser automation

How to Schedule Full-Page Screenshots of Indian Exam Result Websites

By Freedom251 Team · · 8 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright to open the specific exam-result page, wait until its result content is visible, and save a full-page screenshot. Then run that script on a schedule—for example, with GitHub Actions or a local cron service. The portal, its readiness signal, and how often it should be checked depend on the particular exam; no single schedule or page selector works for every Indian result website.

What you need before scheduling a capture

  • The exact result-page URL. Keep it configurable; Indian exam sites do not all share the same page flow.
  • A stable indication that the page has rendered the content you want, such as a result heading, table, or status element. You will need to identify the appropriate selector on the chosen portal.
  • A place to run the browser script: a computer or server with a scheduler, or a hosted CI service such as GitHub Actions.
  • A plan for where screenshots and execution logs will be stored, who can access them, and how long they should be retained. Result screenshots may contain personal details.

Before automating a public portal, inspect its terms and page flow. The available documentation does not establish the access rules, rate limits, or behavior of every Indian exam website.

As an Amazon Associate I earn from qualifying purchases.

Write a Playwright script that waits for the result page

Playwright can capture the entire scrollable page with fullPage: true, rather than only the visible viewport. Its screenshot API also supports output and scale options. The example below uses a configurable URL and selector; replace the example values with the page and readiness signal you have verified.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Playwright and its Chromium browser in your project:

npm init -y
npm install playwright
npx playwright install chromium

Save this as screenshot.mjs:

import { chromium } from 'playwright';
import { mkdir } from 'node:fs/promises';

const url = process.env.RESULT_URL;
const readySelector = process.env.RESULT_READY_SELECTOR;

if (!url || !readySelector) {
  throw new Error('Set RESULT_URL and RESULT_READY_SELECTOR');
}

const timestamp = new Date().toISOString().replaceAll(':', '-');
const outputDir = process.env.OUTPUT_DIR ?? 'screenshots';
const outputPath = `${outputDir}/result-${timestamp}.png`;

await mkdir(outputDir, { recursive: true });
const browser = await chromium.launch({ headless: true });

try {
  const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
  await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60_000 });
  await page.locator(readySelector).waitFor({ state: 'visible', timeout: 60_000 });
  await page.screenshot({ path: outputPath, fullPage: true, animations: 'disabled' });
  console.log(`Saved ${outputPath}`);
} finally {
  await browser.close();
}

Run it by setting the URL and a selector that identifies meaningful result content. For example, in a POSIX-compatible shell:

RESULT_URL='https://example.com/results' 
RESULT_READY_SELECTOR='h1' 
node screenshot.mjs

https://example.com/results and h1 are illustrative only, not a researched portal or a universal selector. Choose a selector that appears only when the intended result or notice is actually ready. A generic page heading may be insufficient if the result table loads separately.

Why wait for content instead of sleeping

A navigation event can happen before a result table or notice appears. Wait for the portal-specific result element, not merely for an arbitrary number of seconds. Playwright documents load-state waits, and its actions generally auto-wait; a fixed delay alone is not a dependable readiness check. If the page renders its result inside a frame or only after an interaction, inspect that flow and adapt the script rather than assuming the main document is ready.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Free Fling File Transfer Software for Windows [PC Download]
  • Intuitive interface of a conventional FTP client
  • Easy and Reliable FTP Site Maintenance.
  • FTP Automation and Synchronization

Adjust the image for long or responsive pages

A full-page screenshot is a tall image of the page as rendered. Check that text remains legible and that the file size is practical. If necessary, change the viewport dimensions or screenshot scale, or capture a specific result element instead of the entire page. Confirm the page layout at the viewport used by the scheduled browser, since responsive sites can rearrange content.

Schedule the script with GitHub Actions

GitHub Actions scheduled workflows use POSIX cron syntax. Schedules default to UTC, can optionally use an IANA time zone, and have a documented minimum interval of five minutes. Scheduled workflows run on the repository’s default branch. GitHub warns that high workflow load can delay scheduled runs, particularly near the start of an hour, and some queued jobs may be dropped. See GitHub’s schedule event documentation.

For a once-daily example, 17 2 * * * means 02:17 UTC every day in POSIX cron. This is an example, not a recommended universal capture time. Choose a cadence appropriate to the exam and page, and avoid unnecessary repeated requests to a public portal.

Add a workflow file

Create .github/workflows/result-screenshot.yml in the repository’s default branch. Store the portal URL and selector as repository variables (Settings → Secrets and variables → Actions → Variables), then use this workflow:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
name: Scheduled result screenshot

on:
  schedule:
    - cron: '17 2 * * *'
  workflow_dispatch:

jobs:
  capture:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - name: Capture result page
        env:
          RESULT_URL: ${{ vars.RESULT_URL }}
          RESULT_READY_SELECTOR: ${{ vars.RESULT_READY_SELECTOR }}
        run: node screenshot.mjs
      - name: Upload screenshot and logs
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: result-screenshot-${{ github.run_id }}
          path: screenshots/
          if-no-files-found: ignore
          retention-days: 7

Commit a lockfile so npm ci can install the dependencies reproducibly. The artifact settings above retain uploaded images for seven days; change that period to fit your record-keeping needs, and treat access to the repository and artifacts accordingly. This workflow demonstrates scheduled capture and artifact storage; it does not guarantee a run at an exact wall-clock time.

Local cron or another scheduler

A local cron service can run the same Node.js command. For example, a crontab entry for 02:17 UTC daily could be:

17 2 * * * RESULT_URL='https://example.com/results' RESULT_READY_SELECTOR='h1' /usr/bin/node /path/to/screenshot.mjs >> /path/to/capture.log 2>&1

Replace the illustrative URL, selector, and paths. Confirm the machine’s time zone and environment: cron jobs may not inherit the same PATH or environment variables as an interactive terminal. A local schedule will not run while the computer is powered off or unavailable; use a hosted runner if the capture must run independently of your computer.

Check the first runs and keep the result useful

  1. Run the script manually and verify that the intended result content—not a loading screen, access challenge, or error page—appears in the screenshot.
  2. Open the full image and inspect content below the fold, text legibility, page layout, and any content that loads later than the readiness selector.
  3. Check the execution log and confirm the timestamped file was saved where expected.
  4. After enabling the schedule, inspect the first scheduled runs and set up a way to notice failures or missing captures. GitHub’s schedule can be delayed or dropped during high load.
  5. Adjust the selector, viewport, scale, capture target, or schedule based on what those runs show. Do not increase polling frequency without a reason; no general rate limit for Indian exam portals is established here.

Troubleshooting scheduled screenshots

  • The screenshot shows a loading page or no result: the script may have waited for navigation rather than the actual result. Select a portal-specific element that becomes visible when the result is ready; investigate any extra page interaction or delayed rendering.
  • The script times out waiting for the selector: check that the selector exists on the live page and is not hidden, renamed, or inside a frame. A page redesign can invalidate a previously working selector.
  • The image ends before the content you need: confirm that fullPage: true is used and inspect whether the page loads content only as it is scrolled. Consider targeting the relevant element or adjusting the capture strategy for that portal.
  • The screenshot is too tall, large, or hard to read: inspect the page at the configured viewport and adjust viewport or scale, or capture the result area rather than the whole page.
  • The scheduled job does not appear at its nominal time: check the workflow’s default-branch placement, cron expression, time zone, and Actions run history. Scheduled events can be delayed or dropped under high load, so do not rely on them as an exact-time trigger.
  • The workflow cannot find Node, Playwright, or Chromium: verify that dependency installation completed in the workflow and that the job installs the browser and its system dependencies before running the script.
  • No image is retained after a hosted run: ensure the output path matches the artifact upload path and review the job logs. Hosted runner files are not a durable archive by themselves; configure an appropriate retention or storage method.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What a screenshot can—and cannot—tell you

A screenshot records rendered pixels. It can preserve a visual record of what the browser displayed, but it is not structured result data and does not independently verify that a result is correct. If the image contains candidate-specific information, limit access and retention to what the intended use requires.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. The API can return an image or PDF, and accepts controls for full-page capture, viewport, device, waiting, and other capture settings. Cookie/consent banners, newsletter popups, and chat widgets can be removed before the shot; each cleanup step can be turned off. Bot checks, blank pages, timeouts, and failed loads are not billed, and response headers identify the page verdict and billing status. The MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

For example, save a WebP screenshot of the target page with cURL (replace the URL and provide your API key):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/results -o shot.webp

See the ScreenshotNeo API documentation for authentication and request options. If your exact selector-based readiness check is necessary, inspect the available capture parameters before switching; this one-call example does not reproduce the Playwright selector wait above.

ScreenshotNeo includes 1,000 screenshots per month on its free plan with no card required; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo, then sign up for 1,000 free screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can I run a scheduled capture more often than once a day?

GitHub Actions documents a five-minute minimum interval, but that is a scheduling limit, not guidance to poll an exam portal that frequently. Choose a cadence suited to the page and its access conditions.

Does a full-page screenshot verify an exam result?

No. It records the page as rendered in the browser; it is not structured data or independent verification.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

browser automationexam resultsGitHub ActionsPlaywrightscreenshotsWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.