How angular/protractor works
Protractor is a Node.js end-to-end testing framework for Angular and AngularJS applications. Test authors define specs and configuration; Protractor loads and schedules test runs, creates WebDriver sessions, and exposes browser, element, locator, and wait-condition APIs for interacting with the application in a real browser. Angular-specific client scripts support synchronization and Angular-aware queries. The README documents browser-based test execution; the supplied source excerpts do not show the complete runner-to-framework call chain, so those links are marked unverified.
Main entry points: browser.ts Browser API · config.ts Run configuration · runner.ts Test runner · taskScheduler.ts Task scheduler
Components 19
Test entry
- Test specs
spec - CLI
lib/cli.ts
Run coordination
- Run configuration
lib/config.ts - Config parser
lib/configParser.ts - Test runner
lib/runner.ts - Task scheduler
lib/taskScheduler.ts - Test frameworks
lib/frameworks - Plugin hooks
lib/plugins.ts
Browser control
- Driver selection
lib/driverProviders/index.ts - Driver provider
lib/driverProviders/driverProvider.ts - WebDriver
lib/selenium-webdriver/webdriver.js - Browser API
lib/browser.ts - Element API
lib/element.ts - Locators
lib/locators.ts - Wait conditions
lib/expectedConditions.ts
Angular support
- Angular client scripts
lib/clientsidescripts.js
Other components
- Test author
- Application under test
- Selenium service
Connections 21
- Test author → Test specs: writes
README.md - Test author → Run configuration: configures
lib/config.ts - CLI → Config parser: loads config
- Config parser → Run configuration: builds config
lib/configParser.ts - Test runner → Task scheduler: schedules tasks
- Test runner → Test frameworks: runs specs
- Test runner → Driver selection: selects driver
- Driver selection → Driver provider: builds provider
lib/driverProviders/index.ts - Driver selection → Run configuration: reads settings
lib/driverProviders/index.ts - Task scheduler → Config parser: uses config parser
lib/taskScheduler.ts - Task scheduler → Run configuration: uses config
lib/taskScheduler.ts - Run configuration → Plugin hooks: types plugin config
lib/config.ts - WebDriver → Selenium service: connects to
README.md - Driver provider → Selenium service: creates sessions
- Browser API → Element API: uses
lib/browser.ts - Browser API → Locators: uses
lib/browser.ts - Browser API → Wait conditions: uses
lib/browser.ts - Browser API → Angular client scripts: executes scripts
lib/browser.ts - Test specs → Browser API: interacts through
README.md - Browser API → Application under test: drives browser
README.md - Angular client scripts → Application under test: checks Angular hooks
lib/clientsidescripts.js