Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

How to Use Protractor to Test Angular Apps (Legacy Setup Guide)

Keep an existing Protractor suite working by ensuring Angular Testability is available—especially with standalone bootstrap—and know what Angular recommends for new E2E setups.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an existing Protractor suite, the key requirement is that Angular exposes its Testability APIs so Protractor can wait for the app to become stable. NgModule-bootstrapped apps include Testability by default; standalone apps bootstrapped with bootstrapApplication need provideProtractorTestingSupport(). Protractor is a legacy choice for Angular: Angular’s roadmap describes a shift away from it beginning with v12, and the current CLI E2E guide lists other integrations for new setups.

How Protractor works with Angular

Protractor uses Angular Testability hooks to synchronize browser interactions with Angular’s stability. Angular’s Testability API exposes browser-accessible test hooks, including whenStable, which calls its callback when Angular is stable or when the supplied timeout expires. That supports Angular-aware waiting; it is not a guarantee that every kind of asynchronous work in an application is tracked.

Consequently, the first setup question is how the app is bootstrapped. The Protractor suite needs Angular Testability to be present, and the two bootstrap patterns below differ in whether it is added automatically.

Use Protractor with an existing NgModule app

Angular’s API documentation says Testability is instantiated by default for applications bootstrapped through @NgModule.bootstrap. That gives Protractor’s Angular-aware waiting logic access to Angular’s testing hooks without a separate Testability provider in the app bootstrap.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Check the app’s bootstrap pattern. Confirm it is an NgModule-based application using @NgModule.bootstrap.
  2. Keep the project’s existing E2E setup. Preserve its Protractor configuration, E2E target, and serving workflow, and ensure those pieces are compatible with the Angular, Protractor, browser, and driver versions actually used in the project.
  3. Start the app as the project expects. Use the repository’s existing serve or test setup rather than assuming a universal command or a current Angular CLI-generated Protractor recipe.
  4. Run the configured E2E target. Invoke the E2E command documented by the project. In current Angular CLI terminology, ng e2e invokes the configured E2E target; it does not by itself imply Protractor is installed or configured.
  5. Check that Angular is ready before diagnosing timing failures. If Protractor waits indefinitely or interacts too early, verify that the app exposes Testability and investigate whether the work in question is tracked by Angular.

Make Protractor work with a standalone Angular app

Apps bootstrapped with bootstrapApplication do not include Testability by default. Add Angular’s provideProtractorTestingSupport() provider to the bootstrap providers when the application must support a Protractor suite:

import { provideProtractorTestingSupport } from '@angular/platform-browser';

await bootstrapApplication(RootComponent, {
  providers: [provideProtractorTestingSupport()],
});

Angular documents this provider set specifically as support for Protractor, which relies on the Testability APIs being present. Without it, Protractor’s Angular-aware synchronization may not have the hooks it expects.

Diagnose Protractor synchronization problems

When an E2E step hangs, races ahead, or times out, separate missing Angular hooks from asynchronous work the hooks may not observe. Angular documents whenStable as invoking its callback when Angular is stable or the specified timeout expires; that description does not promise coverage of every app-specific asynchronous task.

  • Protractor cannot synchronize with the app: verify the bootstrap pattern. For standalone bootstrap, confirm provideProtractorTestingSupport() is included in the providers.
  • A step times out despite Testability being available: identify the asynchronous activity involved and check whether it is tracked as Angular work. Use an explicit wait tied to the condition the test needs when appropriate, rather than adding arbitrary sleeps as the first response.
  • The local run works but CI fails: check the project’s actual Angular, Protractor, browser, and driver versions and its existing app-serving configuration. The current Angular CLI E2E guide does not supply a complete Protractor installation recipe for legacy projects.
  • ng e2e does not run Protractor: inspect the configured E2E target. The command runs that target; the selected integration depends on project configuration.

Should you start a new Angular E2E suite with Protractor?

For a new setup, begin with Angular’s current CLI E2E setup guide, which documents Cypress, Nightwatch, WebdriverIO, Playwright, and Puppeteer integrations. Angular’s roadmap records that its v12 E2E strategy moved away from Protractor toward alternatives. The CLI guide names options but does not rank them or declare one universal winner.

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

Choose based on your project’s browser-engine needs, test language and runner, CI environment, debugging and trace workflow, Angular synchronization requirements, migration effort, and team familiarity. Those are practical evaluation criteria, not an official Angular ranking. Keep E2E browser automation distinct from unit testing: Angular’s separate testing overview describes Vitest as the default unit-test runner for new CLI projects and discusses optional browser mode; it is not itself an E2E migration recipe.

Capture screenshots without maintaining browser automation

If the goal is to capture a rendered page rather than interactively test Angular behavior, ScreenshotNeo offers a screenshot API and MCP server. It does not replace an E2E suite’s assertions or user-flow checks, but it can avoid setting up a browser just to save a page image or PDF.

Or skip the browser setup

Make one GET request with a URL to receive an image or PDF. For example, this cURL request saves a WebP screenshot of the target page:

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

See the ScreenshotNeo API documentation for request options. It accepts cookie banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.

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

Sign up for ScreenshotNeo’s free plan.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Does an NgModule-based Angular app need a Testability provider for Protractor?

Angular documents that apps bootstrapped through @NgModule.bootstrap include Testability by default.

Does adding Protractor testing support make every async task waitable?

No. Angular documents when Testability’s whenStable callback runs, but that is not a guarantee that every application-specific asynchronous task is tracked.

Is Vitest Angular’s E2E runner?

No. Angular describes Vitest for unit testing; its CLI E2E guide covers separate E2E integrations.

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.

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

Leave a Reply

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

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
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.