protractor-skill — Claude Code skill for Protractor tests
protractor-skill is a Claude Code skill that writes Protractor E2E tests for Angular and AngularJS apps in JavaScript or TypeScript. It activates on requests about Protractor, element(by.model()), or Angular E2E testing.
MIT 206 installs ★ 393 updated 2026-10-13
npx skills add LambdaTest/agent-skills --skill protractor-skill -a claude-codeWhat protractor-skill does
protractor-skill generates Protractor E2E tests for Angular and AngularJS projects. Its examples cover login checks, Angular locators, and the Page Object pattern.
The skill also provides a sample protractor.conf.js and a mapping from Protractor calls to Playwright. Protractor is officially deprecated; the Angular team recommends Playwright or Cypress. The sample configuration points to a Selenium server at http://localhost:4444/wd/hub, and the run command is npx protractor conf.js.
What it helps with
- write an Angular login E2E test with Protractor
- locate form elements through Angular bindings
- organize test selectors and actions in a Page Object
- map Protractor calls to Playwright equivalents
Example prompts for the agent
- Write a Protractor E2E login test for this Angular app.
- Find the
ctrl.emailmodel field and submit button with Protractor locators. - Show the Playwright equivalent of
browser.get(url).
How to install protractor-skill
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill protractor-skill -a claude-code2Manually: put the files in place
~/.claude/skills/protractor-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/protractor-skill/
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill protractor-skill -a codex2Manually: put the files in place
.agents/skills/protractor-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill protractor-skill -a cursor2Manually: put the files in place
.cursor/skills/protractor-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install LambdaTest/agent-skills protractor-skill2Manually: put the files in place
.github/skills/protractor-skill/SKILL.md1Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill protractor-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/LambdaTest/agent-skills --path protractor-skillManually: put the files in place
.devin/skills/protractor-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add LambdaTest/agent-skills --skill protractor-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about protractor-skill
How do I install protractor-skill in Claude Code?
Run npx skills add LambdaTest/agent-skills --skill protractor-skill -a claude-code. The skill file is at ~/.claude/skills/protractor-skill/SKILL.md.
What does protractor-skill do?
It generates Protractor E2E tests for Angular and AngularJS apps. Examples cover locators, Page Objects, and Protractor configuration.
Is Protractor still supported?
Protractor is officially deprecated. The Angular team recommends Playwright or Cypress instead.
Source text
SKILL.md · MIT
---
name: protractor-skill
description: >
Generates Protractor E2E tests for Angular/AngularJS apps in JS/TS.
NOTE: Protractor is officially deprecated — recommend Playwright or Cypress.
Use when user mentions "Protractor", "element(by.model())", "Angular E2E".
Triggers on: "Protractor", "element(by.model)", "Angular E2E test",
"protractor.conf".
languages:
- JavaScript
- TypeScript
category: e2e-testing
license: MIT
metadata:
author: TestMu AI
version: "1.0"
---
# Protractor Automation Skill (Deprecated)
> **Protractor reached end-of-life in 2023.** Angular team recommends Playwright or Cypress.
For TestMu AI cloud execution, see [reference/cloud-integration.md](reference/cloud-integration.md) and [shared/testmu-cloud-reference.md](../shared/testmu-cloud-reference.md).
## Core Patterns
### Basic Test
```javascript
describe('Login', () => {
beforeEach(async () => {
await browser.get('/login');
});
it('should login with valid credentials', async () => {
await element(by.model('email')).sendKeys('[email protected]');
await element(by.model('password')).sendKeys('password123');
await element(by.css('button[type="submit"]')).click();
expect(await browser.getCurrentUrl()).toContain('/dashboard');
expect(await element(by.css('.welcome')).getText()).toContain('Welcome');
});
it('should show error for invalid credentials', async () => {
await element(by.model('email')).sendKeys('[email protected]');
await element(by.model('password')).sendKeys('wrong');
await element(by.css('button[type="submit"]')).click();
expect(await element(by.css('.error')).isDisplayed()).toBe(true);
});
});
```
### Angular-Specific Locators
```javascript
element(by.model('ctrl.email')); // ng-model
element(by.binding('ctrl.username')); // Angular binding
element(by.exactBinding('ctrl.name')); // Exact binding
element(by.repeater('item in items')); // ng-repeat
element.all(by.repeater('item in items')).count(); // Count repeater
element(by.cssContainingText('.item', 'Active')); // CSS + text
element(by.buttonText('Submit')); // Button text
element(by.partialButtonText('Sub')); // Partial text
```
### Page Objects
```javascript
class LoginPage {
constructor() {
this.emailInput = element(by.model('email'));
this.passwordInput = element(by.model('password'));
this.loginButton = element(by.css('button[type="submit"]'));
this.errorMessage = element(by.css('.error'));
}
async login(email, password) {
await this.emailInput.sendKeys(email);
await this.passwordInput.sendKeys(password);
await this.loginButton.click();
}
}
// Usage
const loginPage = new LoginPage();
await loginPage.login('[email protected]', 'password123');
```
### protractor.conf.js
```javascript
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['specs/**/*.spec.js'],
capabilities: { browserName: 'chrome' },
jasmineNodeOpts: { defaultTimeoutInterval: 30000 },
onPrepare: () => {
browser.waitForAngularEnabled(true);
}
};
```
### Migration Guide
| Protractor | Playwright |
|-----------|------------|
| `element(by.model('x'))` | `page.locator('[ng-model="x"]')` |
| `element(by.css('#id'))` | `page.locator('#id')` |
| `browser.get(url)` | `page.goto(url)` |
| `element.sendKeys(text)` | `locator.fill(text)` |
| `browser.sleep(ms)` | `page.waitForTimeout(ms)` |
| `browser.waitForAngular()` | Not needed (auto-wait) |
### Cloud Execution on TestMu AI
Set environment variables: `LT_USERNAME`, `LT_ACCESS_KEY`
```javascript
// conf.js
exports.config = {
seleniumAddress: `https://${process.env.LT_USERNAME}:${process.env.LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub`,
capabilities: {
browserName: 'chrome',
'LT:Options': {
user: process.env.LT_USERNAME,
accessKey: process.env.LT_ACCESS_KEY,
build: 'Protractor Build',
name: 'Protractor Test',
platformName: 'Windows 11',
video: true,
console: true,
network: true,
},
},
};
```
## Run: `npx protractor conf.js` (deprecated, use Playwright/Cypress instead)
## Deep Patterns
For advanced patterns, debugging guides, CI/CD integration, and best practices,
see `reference/playbook.md`.
© TestMu AI · MIT · LambdaTest/agent-skills