# Protractor

> **TL;DR**
> Available only in IntelliJ IDEA with the Ultimate subscription: [download](https://www.jetbrains.com.cn/en-us/idea/download/) to try or [explore the features](https://www.jetbrains.com.cn/en-us/products/compare/?product=idea&product=idea-ult).
>
>
>
>
>
> Required plugins:
>
>
>
> `JavaScript and TypeScript` -    the plugin is bundled with IntelliJ IDEA and enabled by default.
>
>
>
> `Angular and AngularJS` -    install the plugin on the Settings | Plugins page, tab Marketplace.     The plugin is available only in IntelliJ IDEA with the Ultimate subscription.

[Protractor](http://www.protractortest.org) is a test framework for [Angular](https://angular.io/) and [AngularJS](http://angularjs.org/) applications.   Protractor executes tests against your application running in a real browser, which ensures correctness and trustworthiness of test results.  IntelliJ IDEA integrates with Protractor, so you can run and debug your tests from inside the IDE. You can see the test results in a treeview and easily navigate to the test source from there.

## Before you start

Procedure:

1. Download and install [Node.js](http://nodejs.org/#download).

2. Make sure the  JavaScript and TypeScript plugin is enabled in the settings.  Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.  Click the Installed tab. In the search field, type JavaScript and TypeScript. For more information about plugins, refer to [Managing plugins](managing-plugins.html).

3. Install and enable the Angular and AngularJS plugin on the Settings | Plugins page, tab Marketplace, as described in [Installing plugins from
JetBrains Marketplace](managing-plugins.html#install_plugin_from_repo).     The plugin is available only in IntelliJ IDEA with the Ultimate subscription.

## Install Protractor

You can install Protractor locally, in your project, or globally. Global installation is preferable.

Procedure: Install Protractor globally

1. In your command-line shell or in the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Alt+F12` (NetBeans), `Ctrl+Alt+1` (Visual Studio), `⌘ ⌃ 1` (Visual Studio (macOS)), `Alt+F12` (Eclipse), `⌥ F12` (Eclipse (macOS))) , type:

`npm install -g protractor`

2. To download the necessary binaries, type `webdriver-manager update`. See also [Getting Started on the Protractor official website](http://www.protractortest.org/#/).

## Run tests

Protractor tests are launched only through a run/debug configuration.

Procedure: Create a Protractor run configuration

1. Open the [Run/Debug Configuration](run-debug-configurations-dialog.html) dialog (`Run | Edit Configurations` in the main menu), click ![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) in the left-hand pane, and select Protractor from the list.

The [Run/Debug Configuration: Protractor](run-debug-configuration-protractor.html) dialog opens.

> **Tip:**
> Alternatively, select a test file in the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS)))  and select Create <filename> from the context menu.

2. Specify the Node.js runtime to use.

If you choose the Project alias, IntelliJ IDEA will automatically use the project default interpreter from the Node runtime field on the [JavaScript Runtime](javascript-runtime.html) page . In most cases, IntelliJ IDEA detects the project default runtime and fills in the field itself.

You can also choose another configured local or remote interpreter or click ![the Browse button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.general.ellipsis.svg) and configure a new one.

3. Specify the location of the  protractor package and the path to the `protractor.conf.js` configuration file. If you followed the standard installation, IntelliJ IDEA detects all these paths and displays them in the corresponding fields.

4. Specify the tests to run. This can be a specific test or suite, an entire test file, or a folder with test files.

Procedure: Run tests via a run configuration

1. Start the Selenium Server manually or configure it to start automatically in `protractor.conf.js`. For more information, refer to the [Protractor official website](https://www.protractortest.org/#/tutorial#setup).

2. Select the Protractor run/debug configuration from the list of configurations and click ![the Run icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.run.svg) in the list or on the toolbar.

3. View and analyze messages from the server in the <current_run_configuration_name> tab of the Run tool window.

## Navigation

With IntelliJ IDEA, you can jump between a file and the related test file or from a test result in the [Test Runner Tab](null) to the test.

Procedure:

* To jump between a test and its subject or vice versa, open the file in the editor and select `Go to | Test` or `Go to | Test Subject` from the context menu, or just press `Ctrl+Shift+T` (Windows), `⌘ ⇧ T` (macOS), `⌘ ⇧ T` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ T` (macOS System Shortcuts), `Ctrl+Shift+T` (XWin), `Ctrl+Shift+T` (GNOME), `Ctrl+Shift+T` (KDE), `Ctrl+Shift+T` (Emacs), `Ctrl+Shift+T` (Sublime Text), `Ctrl+Shift+T` (Sublime Text (macOS)), `Ctrl+Shift+T` (NetBeans), `Ctrl+Shift+T` (Visual Studio), `Ctrl+Shift+T` (Visual Studio (macOS)), `Ctrl+Shift+T` (Eclipse), `Ctrl+Shift+T` (Eclipse (macOS)).

* To jump from a test result to the test definition, click the test name in the Test Runner tab twice, or select `Jump to Source` from the context menu, or just press `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (NetBeans), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F12` (Eclipse), `F3` (Eclipse (macOS)). The test file opens in the editor with the caret placed at the test definition.

## Debug tests

A debugging session for Protractor tests is started only through a run/debug configuration.

Procedure: To start debugging tests

1. Create a Protractor run/debug configuration [as described above](#createRunConfigProtractor).

2. Select the Protractor run/debug configuration from the list of configurations and click ![Run with Coverage](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg) in the list or on the toolbar.

3. In the [Debug tool window](debug-tool-window.html) that opens,   proceed as usual: [step through the program](stepping-through-the-program.html),  [stop
and resume](starting-the-debugger-session.html#pause-resume)  program execution, [examine it when suspended](examining-suspended-program.html), explore the call stack and variables, set watches, evaluate variables, [view actual HTML DOM](viewing-actual-html-dom.html), and so on.

To ignore source maps and step through the actually executed code, press ![the Disable Source Maps toggle button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/sourceMapDisable.png) on the toolbar of the Debug tool window.

## See also

### Reference

[Run/Debug Configuration: Protractor](run-debug-configuration-protractor.html)

