Giter Site home page Giter Site logo

igniteram / protractor-cucumber-typescript Goto Github PK

View Code? Open in Web Editor NEW
196.0 35.0 171.0 2.56 MB

e2e kickstarter test framework which consists of protractor, cucumber frameworks using typescript lang!

License: MIT License

TypeScript 81.45% Gherkin 18.55%
protractor typescript cucumber-framework cucumber-js protractor-cucumber-typescript testing angular nodejs bdd-framework

protractor-cucumber-typescript's Introduction

titleImage.png

This project demonstrates the basic protractor-cucumber-typescript framework project setup.

circleCI Status dependencies status contributors MIT License


Protractor-Cucumber-TypeScript Setup Guide

Medium Article

Please do checkout my medium article which would give you more insight on this setup. protractor-cucumber-typescript(Medium)

Features

  • No typings.json or typings folder, they have been replaced by better '@types' modules in package.json.
  • ts-node(typescript execution environment for node) in cucumberOpts.
  • All scripts written with > Typescript2.0 & Cucumber2.0.
  • Neat folder structures with transpiled js files in separate output folder.
  • Page Object design pattern implementation.
  • Extensive hooks implemented for BeforeFeature, AfterScenarios etc.
  • Screenshots on failure feature scenarios.

To Get Started

Pre-requisites

1.NodeJS installed globally in the system. https://nodejs.org/en/download/

2.Chrome or Firefox browsers installed.

3.Text Editor(Optional) installed-->Sublime/Visual Studio Code/Brackets.

Setup Scripts

  • Clone the repository into a folder
  • Go inside the folder and run following command from terminal/command prompt
npm install 
  • All the dependencies from package.json and ambient typings would be installed in node_modules folder.

Run Scripts

  • First step is to fire up the selenium server which could be done in many ways, webdriver-manager proves very handy for this.The below command should download the chrome & gecko driver binaries locally for you!
npm run webdriver-update
  • Then you should start your selenium server!
npm run webdriver-start
  • The below command would create an output folder named 'typeScript' and transpile the .ts files to .js.
npm run build
  • Now just run the test command which launches the Chrome Browser and runs the scripts.
npm test

result

Writing Features

Feature: To search typescript in google
@TypeScriptScenario

  Scenario: Typescript Google Search
    Given I am on google page
    When I type "Typescript"
    Then I click on search button
    Then I clear the search text

Writing Step Definitions

import { browser } from "protractor";
import { SearchPageObject } from "../pages/searchPage";
const { Given } = require("cucumber");
const chai = require("chai").use(require("chai-as-promised"));
const expect = chai.expect;

const search: SearchPageObject = new SearchPageObject();

Given(/^I am on google page$/, async () => {
    await expect(browser.getTitle()).to.eventually.equal("Google");
});

Writing Page Objects

import { $ } from "protractor";

export class SearchPageObject {
    public searchTextBox: any;
    public searchButton: any;

    constructor() {
        this.searchTextBox = $("#lst-ib");
        this.searchButton = $("input[value='Google Search']");
    }
}

Cucumber Hooks

Following method takes screenshot on failure of each scenario

After(async function(scenario) {
    if (scenario.result.status === Status.FAILED) {
        // screenShot is a base-64 encoded PNG
         const screenShot = await browser.takeScreenshot();
         this.attach(screenShot, "image/png");
    }
});

CucumberOpts Tags

Following configuration shows to call specific tags from feature files

cucumberOpts: {
    compiler: "ts:ts-node/register",
    format: "json:./reports/json/cucumber_report.json",
    require: ["../../stepdefinitions/*.ts", "../../support/*.ts"],
    strict: true,
    tags: "@TypeScriptScenario or @CucumberScenario or @ProtractorScenario",
},

HTML Reports

Currently this project has been integrated with cucumber-html-reporter, which is generated in the reports folder when you run npm test. They can be customized according to user's specific needs.

cucumberreporterscreen

Contributions

For contributors who want to improve this repo by contributing some code, reporting bugs, issues or improving documentation - PR's are highly welcome, please maintain the coding style , folder structure , detailed description of documentation and bugs/issues with examples if possible.

Contributors


Ram Pasala

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿ›

Burk Hufnagel

๐Ÿ’ป

Alejandro

๐Ÿ’ป ๐Ÿ›

David Jimenez

๐Ÿ’ป

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT License

Copyright (c) 2019 Ram Pasala

protractor-cucumber-typescript's People

Contributors

burkhufnagel avatar dependabot[bot] avatar igniteram avatar runnerdave avatar sanko1983 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protractor-cucumber-typescript's Issues

unable to run it in IE

unable to run it in IE ,even after putting driver in webdriver /selenium folder
ans replacing browsername with Internet explorer,
even after giving binaries

It would be great to get a work around

Assertion failure is not reflecting in cucumber report.

const chai = require("chai").use(require("chai-as-promised"));
const expect = chai.expect;

Issue:-1 await expect(element.getText()).to.eventually.equal(expected_txt);
this statement is throwing error in console very well but the test case should be failed according to my understanding, can somebody please guide me what possibly I could be doing wrong?

{"name":"AssertionError","message":"expected 'Sparkle' to equal 'sparkle'","showDiff":true,"actual":"Sparkle","expected":"sparkle","level":"info","stack":"AssertionError: expected 'Sparkle' to equal 'sparkle'\n at getBasePromise.then.then.newArgs (/Users/rkedia/hg/BusinessSystemsTest/protractor-cucumber-typescript/node_modules/chai-as-promised/lib/chai-as-promised.js:302:22)\n at process._tickCallback (internal/process/next_tick.js:68:7)"}
Query:- Let say my actual text is sparkle2018 and expected is if it contains sparkle I am good with the assertion, will this eventually assertion work??

Hooks - After not getting executed with cucumber upgrade

Hi. Can you please upgrade all the dev dependencies specifically cucumber and reformat the code base. I downloaded ur repo and did some enhancements to suit latest versions of dependencies and also upgraded it to work with geckodriver. Struggling to use after hook with cucumber 3.5 version.

npm run tsc fails

When running npm run tsc on a fresh install it fails. I believe some dependencies need to be updated?

Error dump
C:\Users*******\Downloads\protractor-cucumber-typescript-master>npm run tsc

node_modules/protractor/built/browser.d.ts(15,18): error TS2430: Interface 'Abst
ractExtendedWebDriver' incorrectly extends interface 'ExtendedWebDriver'.
Types of property 'controlFlow' are incompatible.F
Type '() => promise.ControlFlow' is not assignable to type '() => promise.Co
ntrolFlow'. Two different types with this name exist, but they are unrelated.
Type 'promise.ControlFlow' is not assignable to type 'promise.ControlFlow'
. Two different types with this name exist, but they are unrelated.
Types of property 'execute' are incompatible.
Type '(fn: () => T | promise.Promise, opt_description?: string)
=> promise.Promise' is not assignable to type '(fn: () => T | promise.Prom
ise, opt_description?: string) => promise.Promise'. Two different types wi
th this name exist, but they are unrelated.
Types of parameters 'fn' and 'fn' are incompatible.
Type 'T | promise.Promise' is not assignable to type 'T | promi
se.Promise'. Two different types with this name exist, but they are unrelated
.
Type 'Promise' is not assignable to type 'T | Promise'.
Type 'promise.Promise' is not assignable to type 'promise.P
romise'. Two different types with this name exist, but they are unrelated.
Types of property 'then' are incompatible.
Type '(opt_callback?: (value: T) => R | promise.IThenab
le, opt_errback?: (error: any) => any) => ...' is not assignable to type '
(opt_callback?: (value: T) => R | promise.IThenable, opt_errback?: (error: an
y) => any) => ...'. Two different types with this name exist, but they are unrel
ated.
Types of parameters 'opt_callback' and 'opt_callback' ar
e incompatible.
Type 'R | promise.IThenable' is not assignable to t
ype 'R | promise.IThenable'. Two different types with this name exist, but th
ey are unrelated.
Type 'IThenable' is not assignable to type 'R | I
Thenable'.
Type 'promise.IThenable' is not assignable to t
ype 'promise.IThenable'. Two different types with this name exist, but they a
re unrelated.
Types of property 'then' are incompatible.
Type '(opt_callback?: (value: R) => R | pro
mise.IThenable, opt_errback?: (error: any) => any) => ...' is not assignable
to type '(opt_callback?: (value: R) => R | promise.IThenable, opt_errback?
: (error: any) => any) => ...'. Two different types with this name exist, but th
ey are unrelated.
Type 'Promise<R | IThenable>' is not assi
gnable to type 'Promise'.
Types of property 'then' are incompatible.

Type '(opt_callback?: (value: R | ITh
enable) => R | IThenable, opt_errback?: (error: any) => a...' is not assig
nable to type '(opt_callback?: (value: R) => R | IThenable, opt_errback?:
(error: any) => any) => Promise'.
Types of parameters 'opt_callback' and
'opt_callback' are incompatible.
Types of parameters 'value' and 'val
ue' are incompatible.
Type 'R | IThenable' is not ass
ignable to type 'R'.
Type 'IThenable' is not assig
nable to type 'R'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] tsc: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] tsc script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users***********\AppData\Roaming\npm-cache_logs\2017-08-11T14_42
_22_833Z-debug.log

Unable to run cucumber tests in parallel

I tried to add the code to config

cucumberOpts: {
compiler: "ts:ts-node/register",
format: "json:./reports/json/cucumber_report.json",
require: ["../../typeScript/stepdefinitions/.js", "../../typeScript/support/.js"],
strict: true,
parallel : 2,
// tags: "@CucumberScenario or @ProtractorScenario or @TypeScriptScenario or @OutlineScenario",
tags: "@Emi",
},
But I could not execute tests in parallel.
I have also tried with multiple feature files combining but no luck
any ideas?

How to update tags from cucumbertags from config.ts file at runtime?

QUESTION

I want to update the config.ts file at runtime where I will be reading excel file where all features and scenarios are present with a run flag. As per the 'Y' it should update that tag attribute from the config.ts file.

Inside excel structure would be something like below,
Run Fla | ScenarioTag
Y | @invalidLogin
N | @validlogin
Y | @ VerifyDashboard

After reading above file it should update config.ts as below,
cucumberOpts: {
compiler: "ts:ts-node/register",
format: "json:./reports/json/cucumber_report.json",
require: ["../../bdd/StepDefinition//.ts", "../../support/*.ts"],
strict: true,
tags: "@invalidLogin or @VerifyDashboard",

Please suggest.

Adding a new test to the repository

I was able to get started with the tests and the pre-built run perfectly fine. I was trying to add a new test in the already built tests.

I added a new .feature file called angular.feature with the following steps

Feature: To search angular on Google

@AngularScenario Scenario: Cucumber Angular search

Given I am on google page
When I type "Angular"
Then I click on search button
Then I clear the search text

And added this as a new step definition in the /stepdefinitions/homepage.ts as


Given(/^I am on angular search results page$/,async ()=>{
    await expect(browser.getTitle()).to.eventually.equal("Angular - Google Search");
});

However, when I run the tests, I see only the pre-built tests are running. What additional steps do I need to add a new test to the framework??

Logging messages to file

Hello,
I am trying to implement loggin with above framework. Below code works for me when i use it in one file but if i want to implement it in clean way,can someone suggest me how can i create return object in typescript and use it in stepdefinations.

Here is working code in JS:

var log4js = require('log4js');
log4js.loadAppender('file');
log4js.addAppender(log4js.appenders.file('LogData.log'), 'logs');
var logger = log4js.getLogger('logs');
logger.debug("Some debug messages");

Can you please tell how do I add assertions in my step definition file?

This is the code in my step definition for assertion --
const headingtitle = element(By.css('h2'));
let heading = await headingtitle.getText();
console.log(heading);
expect(heading).to.be.equal('First Name');
Am facing the below error

E/launcher - Error: TypeError: Cannot read property 'expect' of undefined
at Object. (C:\LenderPortal-UI\typeScript\stepdefinitions\lenderinfo.js:15:26)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:142:42
at Array.forEach ()
at Cli.getSupportCodeLibrary (C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:142:22)
at C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:169:41
at Generator.next ()
at asyncGeneratorStep (C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:44:103)
at _next (C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:46:194)
[18:24:28] E/launcher - Process exited with error code 100

npm test do not transpile the ts file , step mentioned "The above command would create an output folder named 'Typescript' and transpile the .ts files" not working

Hi,

After folowing your steps I am getting following result ;

npm test > calls the script > protractor typescript/config/config.js but it do not transpile and create the folder Typescript.

Editor : Visual studio code
Node version : 6.9.5
Npm version : 3.10.10
tsc -v : 2.2.1

Tried on windows VM. But no success. Seem like transpiler is not working.

Unable to get Cucumber Html Reports

How to generate Cucumber Html reports when running Protractor with sauce labs ,I tried multiple times ,After execution of scripts I am getting "cucumber .123456.json" file but not cucumber.json file

Note :The "cucumber.XXXXX.json" is a random generated file each time
In Config file I added Cucumber Html code(code to generate Html) after Oncomplete() method

VSCode Debugging and Code Coverage

Would someone be able to provide a clean way of adding code coverage as well as debugging functionality from VSCode (with map files to enable typescript debugging).

How to setup a feature with multiple scenarios?

Hello team, I am new to e2e. I have a feature file with multiple scenarios like this:

**Feature**: I would like to login

**Scenario**: Success Login (no active session)
Given ... scenario 1
Then ... scenario 1
When ... scenario 1
  
**Scenario**: Success Login (active session)
Given ... scenario 2
Then ... scenario 2
When ... scenario 2

**Scenario**: Failed Login
Given ... scenario 3
Then ... scenario 3
When ... scenario 3

I have a step file like this:

Given('... scenario 1, () => { });
Then ('... scenario 1, () => { });
When ('... scenario 1, () => { });

Given('... scenario 2, () => { });
Then ('... scenario 2, () => { });
When ('... scenario 2, () => { });

Given('... scenario 3, () => { });
Then ('... scenario 3, () => { });
When ('... scenario 3, () => { });

My questions are:

  • Will the step file run each scenario independently?
  • Is it possible to run each scenario independently in just one step file?
  • If not, how can I run each scenario independently (setup config, file)?

Getting Cannot find module error while running the script

{ Error: Cannot find module 'C:\Users\username\typeScript\config\config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at ConfigParser.addFileConfig (C:\Users\username\node_modules\protractor\built\configParser.js:135:26)
at Object.initFn [as init] (C:\Users\username\node_modules\protractor\built\launcher.js:93:22)
at Object. (C:\Users\username\node_modules\protractor\built\cli.js:226:10)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32) code: 'MODULE_NOT_FOUND' }
[15:39:59] E/configParser - Error code: 105
[15:39:59] E/configParser - Error message: failed loading configuration file typeScript/config/config.js
[15:39:59] E/configParser - Error: Cannot find module 'C:\Users\username\typeScript\config\config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at ConfigParser.addFileConfig (C:\Users\username\node_modules\protractor\built\configParser.js:135:26)
at Object.initFn [as init] (C:\Users\username\node_modules\protractor\built\launcher.js:93:22)
at Object. (C:\Users\username\node_modules\protractor\built\cli.js:226:10)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
npm ERR! Test failed. See above for more details.

Need Info

I have three config files one for staging, one for QA and one for production, how can specify config file while running npm test ?

How I restart browser between Scenarios?

Hi @igniteram ,

Im trying run every scenario with a new browser but doesnt work.

I have added inside of hooks.js :

After(async function(scenario) {
if (scenario.result.status === Status.FAILED) {
// screenShot is a base-64 encoded PNG
const screenShot = await browser.takeScreenshot();
this.attach(screenShot, "image/png");
}
await browser.restart(); // <-- Added restart browser
});

Any idea?

Regards!

Screenshots-

Tried the screenshot snippet: getting this error:
TypeError: this.attach is not a function

Versions:
"protractor-cucumber-framework": "^3.1.2",
"protractor": "~5.1.0",
"cucumber": "^2.3.1",

This is inside my after:

if (scenario.stepsResults !== 'FAILED') {
// screenShot is a base-64 encoded PNG
const screenShot = await browser.takeScreenshot();
this.attach(screenShot, 'image/png');
}

Get Passed Failed Count After running all feature Files and do some post Actions.

Hi,
I am having an requirement as in:-
I have 10 feature files each containing one scenario, and i am currently using 2 instances of the chrome browser.

  1. I want to collect passed failed counts of the total scenarios run and get a consolidated passed failed count when all the feature files have finished running.
  2. Now when my all feature files have run want to do perform a post action let's say use this passed failed count and send it on slack channel(slack api i can hit and write the relevant code).
    .........

Facing problem in getting the counts (Tried with singleton but it dosen't seems to work).
And if i get the counts how to call a post task to do the needful. Any Ref. will be helpful. Thanks in advance.

I am not able to link my feature file to step_definition

Every time I run test with command > npm test it gives me below error message

  1. Scenario: example01 - Test sample
    ? Given that user navigates to "blog"
    Undefined. Implement with the following snippet:

      Given('that user navigates to {string}', function (string) {
        // Write code here that turns the phrase above into concrete actions
        return 'pending';
      });
    

Even though the same step definition is present under step-definition class
I tried this one as well
Given(/^that user navigates to "(.*?)"$/, async (pages: string) =>
but did not recognize
Blow is my feature file scenario:

**Feature: Example Feature
I want to learn how to make test cases
As a user of the test automation tool
I want to run and adjust the tests below
@TypeScriptScenario
Scenario Outline: example01 - Test sample
    Given that user navigates to"<pages>"
    When he searches for"<search>"
    Then text"<expected>" should display somewhere on the page
    Examples:
    | pages|  | search      |     | expected|
    | blog |  |abnc wert |     |Getting started : eebh wewfn|**

I am using the typescript-cucumber-protractor framework in visual studio code.
Please help me how we can generate the step-definition of feature file with automatic regex expression in vs code(Visual studio code)

how could I access the world object in defineSupportCode

Hihi, would like to ask a question about how to access the world object in defineSupportCode method?
I wanna to set specified report name everytime run the test, and the report name specified from --world-parameters;
while I found the world object in defineSupportCode is undefined, which is an object in After method as below:
image
image

thanks~

scenario.attach is not a function

Thanks for the sharing this great project;
when i tried to start the test, get complains as below:
image

may u kindly help on it, thanks~

Console out - of feature/steps

New to this project. How does the console out of the feature files- steps work. What triggers it and how to set it off

Add examples for using Scenario Outline with Async/Await

Can you add examples for using Scenario outline with async/await. I can't seem to find tutorials regarding this and when I try using async with Scenario outline, it always marks the tests as complete without executing any steps.

Thanks!

Consolidate report not getting generated on trying to run the multi capabilities

Hi Ram,

Thanks for such a wonderful project.

When i try to run the feature using multicapbilities,the report getting genrated only for last completed instance.Lets's say if I am running the feature file in Chrome and IE using multi capbilities,the last creted report overide the previous report so either chrome or IE run HTML report alone available in cucumber.reporter html.Is it possible to create consolidated report for multicapbilities?

Same problem exist if i run the multiple features files with option shardTestFiles: true and with maxInstances>1 in conf.js.

ElementArrayFinder

Not an issue per say; but I was curious how you would return an array of elements in the existing page object structure that you have. I took a stab at it by adding 2 new locators to the below snippet from your page objects. Please let me know what you think?

import { $, ElementFinder } from "protractor";
export class SearchPageObject {
    public searchTextBox: ElementFinder;
    public searchButton: ElementFinder;
    public logo: ElementFinder;
    public this.table_rows: ElementArrayFinder

    constructor() {
        this.searchTextBox = $("#lst-ib");
        this.searchButton = $("input[value='Google Search']");
        this.logo = $('div#logocont');
        this.table_rows = element.all('.table > tr');
        this.table_columns = this.table_rows.$$('td');
    }
}

Does this look ok to you? I tried this structure in order to get the rows of a table and then drill to columns and then print out the columns text but wasn't successful. So, thought I'd ask you where you think I am going wrong.

Issue with Initial test run

Followed the steps, when tried to run the 'npm . run webdriver-start', getting below issue
`sais-MacBook-Pro:protractor-cucumber-typescript napas$ npm run webdriver-start

[email protected] webdriver-start /Users/napas/protractor-cucumber-typescript
webdriver-manager start

[11:07:31] I/start - java -Dwebdriver.gecko.driver=/Users/napas/protractor-cucumber-typescript/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0 -Dwebdriver.chrome.driver=/Users/napas/protractor-cucumber-typescript/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_78.0.3904.105 -jar /Users/napas/protractor-cucumber-typescript/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar -port 4444
[11:07:31] I/start - seleniumProcess.pid: 10528
11:07:31.348 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
11:07:31.427 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-11-21 11:07:31.481:INFO::main: Logging initialized @336ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:07:31.697 INFO [WebDriverServlet.] - Initialising WebDriverServlet
11:07:31.769 ERROR [BaseServer.start] - Port 4444 is busy, please choose a free port and specify it using -port option
Exception in thread "main" java.lang.RuntimeException: java.net.BindException: Address already in use
at org.openqa.selenium.grid.server.BaseServer.start(BaseServer.java:221)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:131)
at org.openqa.grid.selenium.GridLauncherV3.lambda$buildLaunchers$3(GridLauncherV3.java:249)
at org.openqa.grid.selenium.GridLauncherV3.lambda$launch$0(GridLauncherV3.java:86)
at java.util.Optional.map(Optional.java:215)
at org.openqa.grid.selenium.GridLauncherV3.launch(GridLauncherV3.java:86)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:70)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.seleniumhq.jetty9.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:307)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:235)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:395)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.openqa.selenium.grid.server.BaseServer.start(BaseServer.java:202)
... 6 more`

Tried with :

webdriver-manager start --detach
webdriver-manager shutdown

Stuck at below instance :
image

Feature Request: Can you add code coverage reporting?

Can you integrate some form of code coverage? So we can see something like:
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | Unknown | Unknown | Unknown | Unknown | |
----------|----------|----------|----------|----------|----------------|

This is the output of istanbul nyc...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.