Questions tagged [gulp-protractor]

a gulp plugin that helps to run AngularJS end-to-end tests using Protractor framework

gulp-protractor is a helper to run AngularJS end-to-end tests using Protractor framework from gulp. In order to operate, protractor package must be installed along gulp-protractor.

Example of usage:

var protractor = require('gulp-protractor').protractor

gulp.src(["./src/tests/*.js"])
  .pipe(protractor({
    configFile: './protractor.config.js',
    args: ['--baseUrl', 'http://127.0.0.1:8080']
  }))
  .on('error', function (error) {
    throw error
  })
117 questions
20
votes
3 answers

Protractor - what best way to check a string IS NOT empty in e2e testing

What is the best way to ensure a value is found (e.g not an empty string) using e2e testing, my example simply matches the text itself, I want to count the string length & ensure it isn't 0. describe 'Device Details', -> device =…
Zabs
  • 13,852
  • 45
  • 173
  • 297
7
votes
1 answer

Protractor how to run login test script first

I am trying to test an Angular Single Page application with protractor. I need to run the login script first. Only then I can move to other routes since there is a check for token in localStorage on route change. Is this testing approach correct?.…
7
votes
5 answers

Gulp Protractor: selenium webdriver exited status 1

I've been using Bangular (an excellent MEAN stack Yeoman generator) to create a project and all was going well until I did a recent series of npm updates to the project. Now on my project (and on their project too) I get an error when running their…
6
votes
3 answers

'$' selector in Protractor

I have seen in many examples like this $('.selector') and I am also using this. So what this $ variable does. This is what I got from the protractor docs. Calls to $ may be chained to find elements within a parent. There is no example in docs…
Vishnu Sureshkumar
  • 2,246
  • 6
  • 35
  • 52
5
votes
1 answer

How to store local storage data using Protractor?

I have seen many examples for fetching the already stored data but didn't get any example for fetching the stored values.
Shravan Jain
  • 720
  • 1
  • 11
  • 32
5
votes
1 answer

Protractor - Generating random data for tests

I am running multiple test suits in a shot. Current I am hard coding the data for testing Example element(by.name('email')).sendKeys(xxxxxx) element(by.name('password')).sendKeys('password') This email field has a unique key constraint, so each…
Vishnu Sureshkumar
  • 2,246
  • 6
  • 35
  • 52
5
votes
1 answer

Protractor Js run to linux machine

I have protractor tests in my angular project, and when I would like run it i catch next exception log: Possibly unhandled RequestError: Error: connect ECONNREFUSED at new RequestError…
Taras Kovalenko
  • 2,323
  • 3
  • 24
  • 49
5
votes
2 answers

Gulp-protractor keep saying "Spec patterns did not match any files"

I'm trying to run my end to end tests written with protractor and jasmine. It works perfectly when I call protractor protractor.config.js directly. However, when I use gulp-protractor, I keep getting the "Spec patterns did not match any files"…
Shay Friedman
  • 4,808
  • 5
  • 35
  • 51
4
votes
2 answers

I have to refresh the page manually while loading for it works in protractor

Well, I'm using chrome. When I run protractor the page begins to load and never finish to load until I refresh the page manually and then everything flow normally. My page use Angular2, is built with MEAN stack. Here my config file: //…
4
votes
0 answers

Running multiCapabilities on browserstack using browserstack-local

I'm working on an angular project where we have end to end tests using protractor. We use gulp-protractor to run these tests. Every thing works fine on local. Now we want to increase the number of browsers and devices under tests, so I started to…
Mat
  • 185
  • 1
  • 11
4
votes
3 answers

Protractor - Change Browser Capabilities at RunTime

Is there a way to change the browser capabilities within beforeEach of the protractor suite. I need to set the Capabilities.name attribute before each spec execution.
user4971738
  • 61
  • 1
  • 4
3
votes
3 answers

Protractor browser.getCurrentUrl() is not working on route change

I have just started using protractor for e2e testing of an Angular single page application. I have started the test with login page. This the test I wrote for fail case Tesr Case 1 it('Login with wrong email', function() { loginPage.get(); …
3
votes
0 answers

Testing abort ng-file-upload with protractor

While uploading a file with ng-file-upload I like to test (with protractor) if cancelling it works. However, during upload no assertions and actions are evaluated, and only after the upload is done the test will fail. That's because I'm expecting…
3
votes
1 answer

protractor different mock httpbackend responses

I'm using a mock module for some testing. When a page gets loaded e.g. browser.get('http://localhost:5643/#/balance/import'); this api url below gets called and we get the below response which works just…
thegunner
  • 6,883
  • 30
  • 94
  • 143
3
votes
1 answer

Protractor + CucumberJS + Gulp-Protractor = When test fails browser does not get closed

Hi! I'm dealing when trying to close the browser once the test had failed, currently, when it passes it does get closed. I'm using "cucumber": "^0.9.2", "gulp": "~3.9.0", "gulp-protractor": "^2.1.0", "protractor":…
1
2 3 4 5 6 7 8