{"id":25932014,"url":"https://github.com/harshalslimaye/protractor-cucumber-typescript","last_synced_at":"2026-05-04T15:34:21.487Z","repository":{"id":134460026,"uuid":"179931556","full_name":"harshalslimaye/protractor-cucumber-typescript","owner":"harshalslimaye","description":"e2e boilerplate which consists of Protractor, CucumberJS and TypeScript","archived":false,"fork":false,"pushed_at":"2019-04-08T20:13:27.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-07T09:04:17.758Z","etag":null,"topics":["angular","bdd-framework","chai","cucumber","end-to-end-testing","gherkin","protractor","protractor-cucumber","testing","typescript"],"latest_commit_sha":null,"homepage":"https://harshal.co","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harshalslimaye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-07T07:27:17.000Z","updated_at":"2019-09-26T10:10:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"28ac4124-29e1-4bde-8131-32643d3eebeb","html_url":"https://github.com/harshalslimaye/protractor-cucumber-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harshalslimaye/protractor-cucumber-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshalslimaye%2Fprotractor-cucumber-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshalslimaye%2Fprotractor-cucumber-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshalslimaye%2Fprotractor-cucumber-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshalslimaye%2Fprotractor-cucumber-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshalslimaye","download_url":"https://codeload.github.com/harshalslimaye/protractor-cucumber-typescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshalslimaye%2Fprotractor-cucumber-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262067922,"owners_count":23253698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","bdd-framework","chai","cucumber","end-to-end-testing","gherkin","protractor","protractor-cucumber","testing","typescript"],"created_at":"2025-03-04T00:15:47.557Z","updated_at":"2025-10-15T00:24:49.398Z","avatar_url":"https://github.com/harshalslimaye.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center\"\u003e\n    \u003cimg alt=\"Protractor\" src=\"https://raw.githubusercontent.com/harshal-limaye/protractor-cucumber-typescript/master/images/protractor.png\"\u003e\n\u003c/div\u003e\n\n# Protractor Cucumber TypeScript\n\n**This project is a barebones implementation of Protractor with Cucumber framework using TypeScript.**\n\n## Prerequisistes\n1. [NodeJS](https://nodejs.org/en/download/)\n2. Web Browser - Chrome/Firefox\n3. Code Editor - Visual Studio Code/Atom/Sublime\n\n## Setup\n1. Open your terminal / command prompt\n2. Clone the repository to your computer\n```\ngit clone https://github.com/harshal-limaye/protractor-cucumber-typescript.git\n```\n3. Navigate to the repository and run following command.\n```\nnpm install\n```\n\u003e This will install all the dependencies mentioned in the ```package.json``` file and copy them inside node_modules folder.\n\n## Usage\nUse the following command to download the necessary binaries.\n```\nnpm run driver-update\n```\nNext, to start the Selenium server use the following command.\n```\nnpm run driver-start\n```\nAnd finally run following command to start the test\n```\nnpm test\n```\n\n## Folders\n1. **features** - used to store .feature files.\n```\nFeature: Testing Calculator\n\n    @Calculator\n    Scenario Outline: Testing All Functions\n        Given go to \"https://juliemr.github.io/protractor-demo/\"\n        When first number is \"\u003cn1\u003e\"\n        When second number is \"\u003cn2\u003e\"\n        When operation to be performed is \"\u003cop\u003e\"\n        When operation in progress\n        Then output should be \"\u003cot\u003e\"\n\n    Examples:\n    | n1 | n2 | op | ot |\n    | 2  | 4  | +  | 6  |\n    | 8  | 3  | -  | 5  |\n    | 2  | 5  | *  | 10 |\n    | 25 | 5  | /  | 5  |\n    | 10 | 3  | %  | 1  |\n```\n\n2. **stepdefinitions** -  contains step definition files in typescript format.\n```\nimport { Given } from 'cucumber';\nimport { browser } from 'protractor';\n\nGiven('go to {string}', async (url) =\u003e {\n    await browser.get(url);\n})\n```\n3. **pages** - used to store page objects\n```\nimport { by, element, ElementFinder } from \"protractor\";\n\nexport class CalcPage {\n  firstNumber: ElementFinder;\n  secondNumber: ElementFinder;\n  operator: ElementFinder;\n  button: ElementFinder;\n  results: any;\n\n  constructor() {\n    this.firstNumber = this.getElByModel(\"first\");\n    this.secondNumber = this.getElByModel(\"second\");\n    this.operator = this.getElByModel(\"operator\");\n    this.button = element(by.id(\"gobutton\"));\n    this.results = element(by.repeater(\"result in memory\")).element(by.css(\"td:nth-child(3)\"))\n  }\n\n  getElByModel(modelName) {\n    return element(by.model(modelName));\n  }\n}\n```\n\n## Reports\nThis project uses [Cucumber HTML Reporter](https://github.com/gkushang/cucumber-html-reporter) package to generate reports. It generates a two files report.json and report.html at the root of this repository each time ```npm test``` command is fired.\n\nYou can change the report file names and there locations by simply updating configuration object passed to ***reporter.generate*** method inside config.ts file located inside config folder.\n\n## Notes\n### Change browser\nOut-of-the-box this project uses chrome as to run the tests, however you could easily change it to Firefox by updating capabilities inside config.ts file.\n\n```\ncapabilities: {\n    browserName: \"chrome\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshalslimaye%2Fprotractor-cucumber-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshalslimaye%2Fprotractor-cucumber-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshalslimaye%2Fprotractor-cucumber-typescript/lists"}