title,body,link,tags,view_count,is_answered,score,answer_count
Angular 2 e2e Testing,"<p>I just started with Angular 2 and e2e testing and I am trying to close a Bootstrap 4 modal by clicking in a blank area, using Protractor. I've tried:</p>

<pre><code>it('should close the login modal when the blank space outside of the modal is clicked', () =&gt; {
  element(by.tagName('body')).click().then(function() {
    browser.sleep(250);
    expect(element(by.id('myModal')).isDisplayed()).toBeFalsy();
  });
});
</code></pre>

<p>...and I've even tried:</p>

<pre><code>it('should close the login modal when the blank space outside of the modal is clicked', () =&gt; {
  browser.actions()
  .mouseMove(element(by.id('login_modal')), -20, -20)
  .click().then(function() {
    browser.sleep(250);
    expect(element(by.id('login_modal')).isDisplayed()).toBeFalsy();
  });
});
</code></pre>

<p>I'm new the the Angular 2 world, so the answer is probably obvious. Thank you in advance for any help.</p>
",https://stackoverflow.com/questions/44474318/angular-2-e2e-testing,"['angular', 'protractor', 'bootstrap-modal', 'e2e-testing']",354,FALSE,0,2
Angular e2e testing without chromedriver,"<p>I am working on angular application e2e tests in very closed and secure environment, where it is not allowed to install chromedriver. It is Windows 7 with IE11 installed. </p>

<p>Command:</p>

<pre><code>npm install chromedriver --save-dev
</code></pre>

<p>results with:</p>

<pre><code>&gt; chromedriver@2.31.0 install C:\_LocalWorkspace\Projects\SomeProject\node_modules\chromedriver
&gt; node install.js

Downloading https://chromedriver.storage.googleapis.com/2.31/chromedriver_win32.zip
Saving to C:\Users\someuser\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
ChromeDriver installation failed Error with http request: Error: connect ETIMEDOUT 172.217.21.208:443
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {""os"":""darwin"",""arch"":""any""} (current: {""os"":""win32"",""arch"":""x64""})
npm WARN app@0.0.1 No repository field.
npm ERR! Windows_NT 6.1.7601
</code></pre>

<p>What are my options for e2e tests in this circumstances? </p>

<p><strong>EDIT1:</strong> </p>

<p>The problem can be described in other words. The environment that I am working in is closed for direct binary downloading. I am working for a client that has such policy and I can not do anything about that. I am also not allowed to install chrome browser so I have to use internet explorer. Therefore, only available webdrivr is iedriver. ( Please correct me if I am wrong )</p>

<p>My main problem is to install all requirements to make protractor works. It is like I have no Internet connection, but just for binaries. Most of the npm dependencies can be installed normally.</p>

<p>Like:</p>

<p><code>npm instal webdriver-manager</code> which works,</p>

<p>but </p>

<p><code>node ./node_modules/protractor/bin/webdriver-manager update</code> fails to download these three files:</p>

<ul>
<li><a href=""https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar"" rel=""nofollow noreferrer"">https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar</a></li>
<li><a href=""https://chromedriver.storage.googleapis.com/2.26/chromedriver_win32.zip"" rel=""nofollow noreferrer"">https://chromedriver.storage.googleapis.com/2.26/chromedriver_win32.zip</a></li>
<li><a href=""https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-win64.zip"" rel=""nofollow noreferrer"">https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-win64.zip</a></li>
</ul>

<p>I have an option (from the client) to download files in isolated environment let them through security check and then use them. I did that and I have placed those 3 files in <code>SomeProject\node_modules\protractor\node_modules\webdriver-manager\selenium</code> directory. </p>

<p>Then I have tried to run node <code>./node_modules/protractor/bin/webdriver-manager update</code> again, hoping that it will skip the download and continue with the normal process steps, extracting etc. But it did not, again it failed to download with the same message.</p>

<p>Then I have extracted the zip files manually. </p>

<p>At this point I am not sure, does <code>node ./node_modules/protractor/bin/webdriver-manager update</code> need to do more things than downloading and extracting. Because it has terminated on download, and I did it manually but how can I know what it would do after if the download was successful? </p>

<p>Anyway, I tried <code>npm run e2e</code> command (which is starting my protractor tests) with extracted binaries in place.</p>

<p>The result was: 
    [13:24:07] I/local - Starting selenium standalone server...
    [13:24:07] I/launcher - Running 1 instances of WebDriver
    [13:24:11] I/local - Selenium standalone server started at <a href=""http://53.150.192.128:58001/wd/hub"" rel=""nofollow noreferrer"">http://53.150.192.128:58001/wd/hub</a>
    [13:24:11] E/launcher - The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see <a href=""https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver"" rel=""nofollow noreferrer"">https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver</a>. The latest version can be downloaded from <a href=""http://sel"" rel=""nofollow noreferrer"">http://sel</a>
    enium-release.storage.googleapis.com/index.html</p>

<p>From error message it is clear that I should download the latest version of iedriver from <a href=""http://selenium-release.storage.googleapis.com/index.html"" rel=""nofollow noreferrer"">here</a> as it is described <a href=""https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver"" rel=""nofollow noreferrer"">here</a></p>

<p>I have chosen the latest version, currently 3.4 </p>

<p><a href=""http://selenium-release.storage.googleapis.com/index.html?path=3.4/"" rel=""nofollow noreferrer"">http://selenium-release.storage.googleapis.com/index.html?path=3.4/</a></p>

<p>that looks like this:</p>

<p><a href=""https://i.stack.imgur.com/i37QJ.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/i37QJ.png"" alt=""enter image description here""></a></p>

<p>I took the first link IEDriverServer_Win32_3.4.0.zip downloaded it and extract it in <code>SomeProject\node_modules\protractor\node_modules\webdriver-manager\selenium</code> </p>

<p>But the problem with the same error message still exists. Am I placing it in correct target directory? Should I download maybe some other file from the image?</p>

<p>Please advise how can I install iedriever and run protractor tests.</p>

<p><strong>EDIT2:</strong></p>

<p>Also, the problem can be generalized and put like. How to install protractor dependencies by downloading them manually?</p>
",https://stackoverflow.com/questions/45435509/angular-e2e-testing-without-chromedriver,"['windows', 'angular', 'protractor', 'selenium-chromedriver', 'e2e-testing']",468,FALSE,1,0
e2e Testing in protractor. SignIn,"<p>I am not able to redirect on required page on sigIn page. It clicks on button but not giving the output as required. Not able to hit the server for further process after signin process.Plz help</p>

<pre><code>describe(""it should be able to run on different events as defined"", function(){
    it(""should be get on browser"", function(){
        browser.get(""http://www.localhost:8100/#/signin"");
        expect(browser.getCurrentUrl()).toEqual(""http://www.localhost:8100/#/signin"");
        browser.sleep(2000);
        element(by.css(""[ng-model='user.email']"")).sendKeys('ash.mat23.23@gmail.com');
        element(by.css(""[ng-model='user.email']"")).getAttribute('placeholder').then(function(element){
            expect(element).toEqual('Email');
            browser.sleep(2000); 
        });
        element(by.css(""[ng-model='user.password']"")).sendKeys('123456');
        element(by.css(""[ng-model='user.password']"")).getAttribute('placeholder').then(function(element){
            expect(element).toEqual('Password (at least 6 characters)');
            browser.sleep(2000);
        });
        element(by.id('signin_submit_btn'));
        browser.driver.actions().sendKeys(protractor.Key.ENTER).perform();
        browser.sleep(5000);
    });
});
</code></pre>
",https://stackoverflow.com/questions/44841276/e2e-testing-in-protractor-signin,['protractor'],55,TRUE,1,2
Sweetalert: e2e testing using Protractor,"<p>I am trying to test my web application which uses SweetAlert. I am using Protractor for e2e testing. </p>

<p>When I tried selecting an element using</p>

<p><code>var textElement = element(by.id(""newWbName""));</code></p>

<p>protractor goes into an infinite loop, saying</p>

<p><code>W/element - more than one element found for locator By(css selector, *[id=""newWbName""]) - the first result will be used</code> </p>

<p>as seen <a href=""https://imgur.com/a/ZcsRq"" rel=""nofollow noreferrer"">here</a>, even though there is only one id with <code>newWbName</code>.</p>

<p>I am wondering if there is anything in how sweet alert renders the alert that is causing this issue?  The selectors work fine when I use them on the rest of the page.  Any help is really appreciated. </p>
",https://stackoverflow.com/questions/41879905/sweetalert-e2e-testing-using-protractor,"['protractor', 'sweetalert']",162,FALSE,0,0
Generating coverage report for e2e testing,"<p>I've created an Angular 2 Typescript application. I'm using Protractor for running e2e test cases. I need to generated coverage report for e2e test cases using Istanbul or any other tool available.
I cannot use grunt-protractor-coverage. Also, protractor-istanbul-plugin is abandoned now and cannot be used for production level applications.
Is there any other tool available for generating coverage report for e2e test cases?</p>
",https://stackoverflow.com/questions/41802983/generating-coverage-report-for-e2e-testing,"['angularjs', 'typescript', 'protractor', 'e2e-testing', 'istanbul']",242,FALSE,2,0
Protractor : Angular e2e testing repeat selector,"<p><a href=""https://i.stack.imgur.com/f0Pb0.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/f0Pb0.png"" alt=""enter image description here""></a> </p>

<p>Need to select Shweta and click on that, how can I achieve that using repeat locator in protractor? I've tried some possible solutions, but it's not working. Could anybody please tell me how to achieve that.</p>
",https://stackoverflow.com/questions/41563256/protractor-angular-e2e-testing-repeat-selector,['protractor'],107,TRUE,0,2
Angular2+ e2e testing - Cannot use by.id,"<p>I'm new to Angular2 and haven't developed the Angular components to be tested. However, I'm supposed to write some some UI (e2e) tests but I'm not even able to input text in an input field.</p>

<p>My problem is that
 <code>element(by.id('username')).sendKeys('test')</code>
is not working. (Same with Button elements and so on)</p>

<p>I'm sure that it is only a small thing but I'm not able to find out what it is.</p>

<p>I have the following configuration:</p>

<ul>
<li><strong>Proctractor</strong>: 5.1.2</li>
<li><strong>chrome driver</strong>: 58.0.3029.110</li>
<li><strong>OS</strong>: Windows NT 6.1.7601 SP1 x86_64</li>
</ul>

<p><strong>Spec file:</strong></p>

<pre><code>import { LoginPage } from './login.po';

describe('login tests', function() {
  let page: LoginPage;

  beforeEach(() =&gt; {
    page = new LoginPage();
  });

  it('Demo', () =&gt; {
    page.navigateTo();
    page.getUsernameInput().sendKeys('test');
  });
});
</code></pre>

<p><strong>Page Object file:</strong></p>

<pre><code>import { browser, element, by } from 'protractor';

export class LoginPage {
  navigateTo() {
    return browser.get('/login');
  }

  getParagraphText() {
    return element(by.class('app-root h1')).getText();
  }

  getUsernameInput() {
    return element(by.id('username'));
  }
}
</code></pre>

<p><strong>The HTML template:</strong></p>

<pre><code>....
&lt;div&gt;
  &lt;input
    id=""username"" 
    name=""username"" 
    ngModel 
    type=""text"" 
    placeholder=""{{something}}"" 
    autocomplete=""off"" 
    class=""input-text"" 
    required&gt;
&lt;/div&gt;
...
</code></pre>

<p><strong>Proctractor config</strong></p>

<pre><code>var SpecReporter = require('jasmine-spec-reporter');

exports.config = {
    allScriptsTimeout: 120000,
    getPageTimeout: 120000,
    specs: [
      './e2e/**/*.e2e-spec.ts'
    ],
    capabilities: {
      'browserName': 'chrome'
    },
    directConnect: true,
    seleniumAddress: 'http://localhost:4444/wd/hub',
    baseUrl: 'http://localhost:8001',
    framework: 'jasmine',
    jasmineNodeOpts: {
      showColors: true,
      defaultTimeoutInterval: 30000,
      print: function() {}
    },
    useAllAngular2AppRoots: true,
    beforeLaunch: function() {
      require('ts-node').register({
        project: 'e2e'
      });
    },
    onPrepare: function() {
      jasmine.getEnv().addReporter(new SpecReporter());
    }
};
</code></pre>

<p>Any help is highly appreciated. </p>

<p><strong>EDIT:</strong>
None of the solutions worked in my case. I ended up using <code>browser.driver.findElement(by.id('username'));</code> instead of <code>element(by.id('username'));</code> This is unsatisfying because I still don't understand why this doesn't work. I'd be thankful if someone could give me a hint or explanation. </p>
",https://stackoverflow.com/questions/44332996/angular2-e2e-testing-cannot-use-by-id,"['javascript', 'angular', 'protractor', 'e2e-testing']",1348,TRUE,0,2
Ionic2: Including Ionic Push breaks E2E testing,"<p>I have a strange situation where if I include Ionic's Push in my app.module.ts, none of my E2E tests will run. The test fails to start with a timeout error. It would appear as though somehow Push is preventing browser.waitForAngular() from returning.</p>

<p>Example 1 - E2E does not work:</p>

<pre><code>import {CloudModule, CloudSettings, Push} from ""@ionic/cloud-angular"";

@NgModule({
    providers: [
        // my other providers ...
        { provide: MyPushService, useClass: MyPushService, deps: [Push] }
    ]
</code></pre>

<p>Example 2 - Add a mock class, E2E does work:</p>

<pre><code>import {CloudModule, CloudSettings, Push} from ""@ionic/cloud-angular"";

@NgModule({
    providers: [
        // my other providers ...
        { provide: Push, useClass: PushMock},
        { provide: MyPushService, useClass: MyPushService, deps: [Push] }
    ]
</code></pre>

<p>I've been looking through the push.js source hoping to find a setTimeout, setInterval or something similar that might make angular think it's waiting for something but I can't see anything.</p>

<p>Any help is much appreciated.</p>
",https://stackoverflow.com/questions/45296988/ionic2-including-ionic-push-breaks-e2e-testing,"['angular', 'push-notification', 'ionic2', 'angularjs-e2e']",62,FALSE,3,1
e2e testing implementation of Angular4 Heroes example,"<p>Here is my code:</p>

<pre><code>describe('my-app Heroes', () =&gt; {
  let page: MyAppPage;
  beforeEach(() =&gt; {
    page = new MyAppPage();
  });

  it('should display dashboard page', () =&gt; {
   page.navigateTo();
   expect(page.getCurrentUrl()).toContain(""dashboard"");
 });

 .
 .// code 
 .
  // want to click first heroes for detail information
  it(""click on first hero"",()=&gt;{
     element(by.css('my-dashboard a:nth-child(1)')).click();
     expect(page.getCurrentUrl()).toContain(""detail"");

   });

});
</code></pre>

<p>error:</p>

<pre><code>1) my-app Heroes click first hero
  - Failed: unknown error: Element &lt;a _ngcontent-c0="""" ng-reflect-router-link=""/detail/12""  href=""/detail/12""&gt;...&lt;/a&gt; is not clickable at point (8, 167). Other element would receive the click: &lt;nav&gt;...&lt;/nav&gt;
    (Session info: chrome=57.0.2987.98)
    (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-62-generic x86_64)
</code></pre>

<p>I have observed that click event for static anchor working well, but for the dynamic anchor getting this error.</p>
",https://stackoverflow.com/questions/44126879/e2e-testing-implementation-of-angular4-heroes-example,"['javascript', 'angularjs', 'angularjs-e2e', 'e2e-testing']",62,FALSE,1,0
e2e testing with protractor in angular 2,"<p>on back-end i use Spring Boot, on front-end i use Angular 2.
i write simple tests for my front-end, but i want to mock my back-end.
i search in google but i do not found answer for my question.
how to mock back-end on testing with protractor?
sorry for my english!
thanks!</p>

<p>i tried this: <a href=""https://www.npmjs.com/package/protractor-mock-backend#"" rel=""nofollow noreferrer"">https://www.npmjs.com/package/protractor-mock-backend#</a> but then i found this: <a href=""https://i.stack.imgur.com/pYF0K.png"" rel=""nofollow noreferrer""> https://github.com/angular/protractor/blob/582411b7ad6c0f9176b231dc51dc328b98affbdf/lib/protractor.js#L717</a></p>
",https://stackoverflow.com/questions/44259351/e2e-testing-with-protractor-in-angular-2,"['mocking', 'protractor', 'e2e-testing', 'angular2-testing']",1357,TRUE,2,2
e2e testing of VueJS app in gitlab-ci,"<p>I have generated a VueJS project using vue-cli, including end to end tests with Nightswatch.js.</p>

<p>I'm using the following .gitlab-ci.yml file</p>

<pre><code>services:
  - selenium/standalone-chrome

stages:
  - test
  - pages

test:
  image: node:6.11
  stage: test
  before_script:
    - node -v
    - npm -v
  script:
    - npm install
    - npm test

pages:
  image: node:6.11
  stage: pages
  before_script:
    - node -v
    - npm -v
  script:
    - npm install
    - npm run build
    - cp -R ./dist ./public
    - cd ./public
    - ls
  artifacts:
    paths:
      - public
  only:
    - master
</code></pre>

<p>This is the <code>nightswatch.conf.js</code> file</p>

<pre><code>require('babel-register')
var config = require('../../config')

// http://nightwatchjs.org/gettingstarted#settings-file
module.exports = {
  src_folders: ['test/e2e/specs'],
  output_folder: 'test/e2e/reports',
  custom_assertions_path: ['test/e2e/custom-assertions'],

  selenium: {
    start_process: true,
    server_path: require('selenium-server').path,
    host: '127.0.0.1',
    port: 4444,
    cli_args: {
      'webdriver.chrome.driver': require('chromedriver').path
    }
  },

  test_settings: {
    default: {
      selenium_port: 4444,
      selenium_host: 'localhost',
      silent: true,
      globals: {
        devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port)
      }
    },

    chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        javascriptEnabled: true,
        acceptSslCerts: true
      }
    },

    firefox: {
      desiredCapabilities: {
        browserName: 'firefox',
        javascriptEnabled: true,
        acceptSslCerts: true
      }
    }
  }
}
</code></pre>

<p>In Gitlab-CI, the job passes but looking at the log only the unit tests are passing, not the end to end tests.</p>

<pre><code>&gt; node test/e2e/runner.js

Starting selenium server... 
An error occurred while trying to start Selenium. Check if JAVA is installed on your machine.
{ Error: spawn java ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:496:3
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn java',
  path: 'java',
  spawnargs: 
   [ '-Dwebdriver.chrome.driver=/builds/Overdrivr/frontend/node_modules/chromedriver/lib/chromedriver/chromedriver',
     '-jar',
     '/builds/Overdrivr/frontend/node_modules/selenium-server/lib/runner/selenium-server-standalone-3.8.1.jar',
     '-port',
     4444 ] }
INFO Selenium process finished.
Job succeeded
</code></pre>

<p>How can I properly configure gitlab-ci or nightswatch to run e2e tests in Gitlab-CI ?</p>
",https://stackoverflow.com/questions/47708097/e2e-testing-of-vuejs-app-in-gitlab-ci,"['vue.js', 'vuejs2', 'gitlab-ci', 'nightwatch.js']",2302,TRUE,5,1
How to setup Selenium E2E testing with GitLab CI?,"<p>I am developing a Vue.js app for a website frontend.</p>

<p>For this app I would like to use Unit and E2E tests. I built my project with <a href=""https://github.com/vuejs/vue-cli"" rel=""noreferrer"">vue-cli</a>. </p>

<p>From my understanding, vue-cli uses Karma for unit tests and Nightwatch + Selenium for E2E tests.</p>

<p>My <code>.gitlab-ci.yml</code> looks like the following:</p>

<pre><code>stages:
  - test

test:express:
  image: node:boron
  stage: test
  script:
    - cd backend/
    - npm install --progress=false
    - ./node_modules/.bin/jasmine

test:vue:
  image: node:boron
  stage: test
  script:
    - cd frontend/
    - npm install --progress=false
    - npm test
</code></pre>

<p><code>npm test</code> runs e2e and unit tests and works on local computers. The Unit tests run smoothly and the Selenium brings up a Chrome window and uses the E2E tests.</p>

<p>The problem is that don't know how to run E2E Selenium tests on GitLab CI. It keeps giving me an error saying:</p>

<p><code>Could not connect to Selenium Server. Have you started the Selenium Server yet?</code>, although it says two lines before that it has already created a Selenium server.</p>

<p>How can I run E2E Selenium tests on GitLab CI? If this is not achievable, what kind of E2E can I run on GitLab CI?</p>
",https://stackoverflow.com/questions/47542709/how-to-setup-selenium-e2e-testing-with-gitlab-ci,"['unit-testing', 'selenium', 'docker', 'gitlab-ci', 'e2e-testing']",7726,FALSE,7,2
Errors when e2e testing angular2 app with protractor,"<p>I'm trying to run some simple tests on my Angular2 app using protractor. I run <code>ng serve</code> in one command prompt and <code>ng e2e</code> in another. I get several errors/comments related to a session exception. Here is a portion of it:</p>

<pre><code>ERROR:child_process_launcher.cc(536)] Failed to launch child process
...
I/direct - Using ChromeDriver directly...
I/launcher - Running 1 instances of WebDriver
E/launcher - session not created exception from tab crashed
(Session info: chrome=55.0.2883.87)
(Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa
),platform=Windows NT 6.1.7601 SP1 x86_64)
  at WebDriverError (C:\development\SolarUI11\node_modules\protractor\node_mod
es\selenium-webdriver\lib\error.js:27:5)
  at SessionNotCreatedError (C:\development\SolarUI11\node_modules\protractor\
de_modules\selenium-webdriver\lib\error.js:308:5)
  at Object.checkLegacyResponse (C:\development\SolarUI11\node_modules\protrac
tor\node_modules\selenium-webdriver\lib\error.js:639:15)
</code></pre>

<p>I'm very new to Angular2 and e2e testing, so I'm a complete loss for what I'm looking at here and what I should be expecting.</p>

<p>app.po.ts:</p>

<pre><code>import { browser, element, by } from 'protractor';

export class SolarUi4Page {
  navigateTo() {
    return browser.get('http://localhost:4200/');
  }

  getTitle() {
    return element(by.css('h1')).getText();
  }

  getAddButton() {
    return element(by.css('.icon-plus'));
  }

  getAddButtonDp() {
    return element(by.binding('dPoint.tDataPoint'));
  }

  getAddButtonIccp() {
    return element(by.binding('dPoint.tICCP'));
  }
  getAddButtonStartD() {
    return element(by.binding('dPoint.tStartDate'));
  }

  getAddButtonEndD() {
    return element(by.binding('dPoint.tEndDate'));
  }

  getAddButtonSubmit() {
    return element(by.id('addSubmit'));
  }

  getStartDate() {
    return element(by.id('calStartTest'));
  }

  getEndDate() {
    return element(by.id('calEndTest'));
  }

  getSearchButton() {
    return element(by.css('.icon-search'));
  }

  getTable() {
    return element(by.id('myTable'));
  }
}
</code></pre>

<p>app.e2e-spec.ts:</p>

<pre><code>import { SolarUi4Page } from './app.po';
import { by } from 'protractor';

describe('solar-ui4 main page', function() {
  let page: SolarUi4Page;

  beforeEach(() =&gt; {
    page = new SolarUi4Page();
  });

  it('should display title Solar Project', () =&gt; {
    page.navigateTo();
    expect(page.getTitle()).toEqual('Solar Project');
  });

  it('should add new value to array/table and display it', () =&gt; {
    page.navigateTo();
    let addButton = page.getAddButton();
    addButton.click();
    let addDp = page.getAddButtonDp();
    let addIccp = page.getAddButtonIccp();
    let addSd = page.getAddButtonStartD();
    let addEd = page.getAddButtonEndD();
    addDp.sendKeys('newDp');
    addIccp.sendKeys('newIccp');
    addSd.sendKeys('11/12/2016');
    addEd.sendKeys('11/20/2016');
    let addSubmit = page.getAddButtonSubmit();
    addSubmit.click();
    let startFormVal = page.getStartDate();
    let endFormVal = page.getEndDate();
    startFormVal.sendKeys('11/02/2016');
    endFormVal.sendKeys('12/20/2016');
    let searchButton = page.getSearchButton();
    searchButton.click();
    let table = page.getTable();
    let lastRow = table.all(by.tagName('tr')).last();
    expect(lastRow.get(0).getText()).toEqual('newDp');
    expect(lastRow.get(1).getText()).toEqual('newIccp');
    expect(lastRow.get(2).getText()).toEqual('11/02/2016');
    expect(lastRow.get(3).getText()).toEqual('12/20/2016');
  })
</code></pre>

<p>protractor.conf.js:</p>

<pre><code>// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  useAllAngular2AppRoots: true,
  beforeLaunch: function() {
    require('ts-node').register({
      project: 'e2e'
    });
  },
  onPrepare: function() {
    jasmine.getEnv().addReporter(new SpecReporter());
  }
};
</code></pre>

<p>If I need to show more errors/add more code let me know.</p>
",https://stackoverflow.com/questions/41575050/errors-when-e2e-testing-angular2-app-with-protractor,"['angular', 'typescript', 'e2e-testing', 'angular2-testing']",564,TRUE,0,1
Multiple environments for e2e testing w/ Angular CLI?,"<p>I am trying to create multiple environments setup for my e2e test but I can't find any specific information about this. I want to set multiple 'baseUrl' and probably 'seleniumAdress' properties regarding to the environment.</p>

<p>For example:</p>

<pre><code>{
  'dev1': {
    baseUrl: 'http://xxxxxxxxxxx.com/',
    params: myParams
  },
  'dev2': {
    seleniumAddress: mySeleniumAddress,
    baseUrl: 'http://yyyyyyyyyyy.com/',
    params: myParams
  },
  'dev3': {
    seleniumAddress: mySeleniumAddress2,
    baseUrl: 'http://zzzzzzzzzzz.com/',
    params: myParams
  }
}
</code></pre>

<p>Anyone knows how to do that?</p>
",https://stackoverflow.com/questions/43386733/multiple-environments-for-e2e-testing-w-angular-cli,"['angular', 'protractor', 'angular-cli']",645,FALSE,1,0
How to set up protractor for my E2E testing?,"<p>I am new to Protractor, i want to learn protractor for Angular application. could someone help me to set up protractor. Thanks in advance.</p>
",https://stackoverflow.com/questions/45545023/how-to-set-up-protractor-for-my-e2e-testing,['protractor'],67,TRUE,0,1
E2E testing of Chat based application on different platform,"<p>I wonder if there is any possibility of testing a chat based application on multiple platforms using automation scripts. Let's say skype, facebook app, etc.</p>

<p>What I understand is that we can automate the app from either of the one side like Android or iOS or Web or  Windows client.
Apparently, I wanted to test the e2e flow on multiple platforms.</p>

<p>My scenarios says as:</p>

<pre><code>1.Login in mobile Android client with User A
2.Send message to User B
3.Login in windows client as User B
4.Verify the received message.
</code></pre>

<p>Is there any way or tool to verify such scenarios?</p>

<p>Thanks in advance</p>
",https://stackoverflow.com/questions/45475435/e2e-testing-of-chat-based-application-on-different-platform,"['selenium-webdriver', 'automation', 'appium', 'skype', 'saucelabs']",392,FALSE,0,1
NodeJS: How to do nightmareJS e2e-testing on running docker application,"<p>I am creating a docker image/container for testing purpose from my productive build application (nodeJS app).
Now I want to do some e2e testing using <strong>mocha/chai</strong> and <strong>nightmareJS</strong>. So I have created a very basic test file.</p>

<p>My problem is now how to test for the running application. So I want to 'load' the application like</p>

<pre><code>- goto http://localhost
- check if login form is existing
- do login
- check if login was successful
</code></pre>

<p>I don't know how to do this in my docker image / e2e.js-file...  </p>

<p>This is how I'm creating the docker image:</p>

<p><strong>Dockerfile</strong></p>

<pre><code># Use the production image as base image
FROM productive_build:latest

# Copy the test files
COPY e2e.js /

# Override the NODE_ENV environment variable to 'dev', in order to get required test packages
ENV NODE_ENV dev

# 1. Get test packages; AND
# 2. Install our test framework - mocha
RUN (cd programs/server &amp;&amp; npm install)
RUN npm install -g mocha
RUN npm install chai nightmare

# Override the command, to run the test instead of the application
CMD [""mocha"", ""e2e.js"", ""--reporter"", ""spec""]
</code></pre>

<p>And this is how my basic e2e.js file looks like:</p>

<p><strong>e2e.js</strong></p>

<pre><code>var Nightmare = require('nightmare'),
    expect = require('chai').expect

describe('test', function () {
  it('should always be true', function () {
    var nightmare = Nightmare()
    nightmare.end()
    expect(true).to.be.true
  })
})
</code></pre>
",https://stackoverflow.com/questions/43901733/nodejs-how-to-do-nightmarejs-e2e-testing-on-running-docker-application,"['javascript', 'node.js', 'testing', 'docker', 'nightmare']",652,TRUE,4,2
Can we use Annotations in protractor to perform e2e testing?,"<p>In selenium, we are using some annotations like @BeforeClass @AfterClass etc.
Is there any type of annotations which we can use in Protractor.</p>
",https://stackoverflow.com/questions/46156960/can-we-use-annotations-in-protractor-to-perform-e2e-testing,"['testing', 'automation', 'jasmine', 'protractor', 'e2e-testing']",995,TRUE,0,1
Protractor E2E Testing - E/launcher - Error: Error: Cannot find module &#39;wd&#39;,"<p>I'm trying exuceted a automated test with protractor, so when my app open and try write in input field, return this message:</p>

<p>C:\Projetos\Pessoal\ionic_app\tests (master)</p>

<p>protractor conf.js</p>

<pre><code>[09:23:42] I/launcher - Running 1 instances of WebDriver
[09:23:42] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[09:25:07] E/launcher - Error: Error: Cannot find module 'wd'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at onPrepare (C:\Projetos\Pessoal\ionic_app\tests\conf.js:18:18)
    at q_1.Promise (C:\Users\c1401314\AppData\Roaming\npm\node_modules\protractor\lib\util.ts:48:39)
    at Function.promise (C:\Users\c1401314\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:682:9)
    at Object.runFilenameOrFn_ (C:\Users\c1401314\AppData\Roaming\npm\node_modules\protractor\lib\util.ts:39:10)
    at plugins_.onPrepare.then (C:\Users\c1401314\AppData\Roaming\npm\node_modules\protractor\lib\runner.ts:103:21)
    at _fulfilled (C:\Users\c1401314\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
[09:25:07] E/launcher - Process exited with error code 100enter code here
</code></pre>

<p>I'm used Appium and Genymotion to emulated my Android Device</p>

<p>Appium return:</p>

<pre><code>    [Appium] Welcome to Appium v1.6.5
    [Appium] Appium REST http interface listener started on 0.0.0.0:4723
    [HTTP] --&gt; POST /wd/hub/session {""desiredCapabilities"":{""platformName"":""android"",""platformVersion"":""7.0"",""deviceName"":""Nexus"",""browserName"":"""",""autoWebview"":true,""app"":""C:\\appium_drivers\\apks\\android-release.apk"",""count"":1}}
    [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{""platformName"":""android"",""platformVersion"":""7.0"",""deviceName"":""Nexus"",""browserName"":"""",""autoWebview"":true,""app"":""C:\\appium_drivers\\apks\\android-release.apk"",""count"":1},null,null]
    [debug] [BaseDriver] Event 'newSessionRequested' logged at 1503057934342 (09:05:34 GMT-0300 (Hora oficial do Brasil))
    [Appium] Creating new AndroidDriver (v1.24.3) session
    [Appium] Capabilities:
    [Appium]   platformName: 'android'
    [Appium]   platformVersion: '7.0'
    [Appium]   deviceName: 'Nexus'
    [Appium]   browserName: ''
    [Appium]   autoWebview: true
    [Appium]   app: 'C:\\appium_drivers\\apks\\android-release.apk'
    [Appium]   count: 1
[debug] [Chromedriver] Changed state to 'online'
[Appium] New AndroidDriver session created successfully, session 967301ea-6ced-4801-9f5a-e3d6b68c2e7f added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1503059100927 (09:25:00 GMT-0300 (Hora oficial do Brasil))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {""platform"":""LINUX"",""webStorageEnabled"":false,""takesScreenshot"":true,""javascriptEnabled"":true,""databaseEnabled"":false,""networkConnectionEnabled"":true,""locationContextEnabled"":false,""warnings"":{},""desired"":{""platformName"":""android"",""platformVersion"":""7.0"",""deviceName"":""Nexus"",""browserName"":"""",""autoWebview"":true,""app"":""C:\\appium_drivers\\apks\\android-release.apk"",""count"":1},""platformName"":""android"",""platformVersion"":""7.0"",""deviceName"":""192.168.104.101:5555"",""browserName"":"""",""autoWebview"":true,""app"":""C:\\appium_drivers\\apks\\android-release.apk"",""count"":1,""deviceUDID"":""192.168.104.101:5555"",""deviceScreenSize"":""1200x1920"",""deviceModel"":""Nexus"",""deviceManufacturer"":""Genymotion"",""appPackage"":""br.com.bematech.staff"",""appWaitPackage"":""br.com.bematech.staff"",""appActivity"":""br.com.bematech.staff.MainActivity"",""appWaitActivity"":""br.com.bematech.staff.MainActivity""}
[HTTP] &lt;-- POST /wd/hub/session 200 78056 ms - 941
[HTTP] --&gt; POST /wd/hub/session/967301ea-6ced-4801-9f5a-e3d6b68c2e7f/timeouts {""type"":""script"",""ms"":11000}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/967301ea-6ced-4801-9f5a-e3d6b68c2e7f/timeouts] to [POST http://127.0.0.1:8000/wd/hub/session/98599620f036c57ea39d899794f9b5c0/timeouts] with body: {""type"":""script"",""ms"":11000}
[debug] [JSONWP Proxy] Got response with status 200: {""sessionId"":""98599620f036c57ea39d899794f9b5c0"",""status"":0,""value"":null}
[JSONWP Proxy] Replacing sessionId 98599620f036c57ea39d899794f9b5c0 with 967301ea-6ced-4801-9f5a-e3d6b68c2e7f
[HTTP] &lt;-- POST /wd/hub/session/967301ea-6ced-4801-9f5a-e3d6b68c2e7f/timeouts 200 8 ms - 76
[HTTP] --&gt; DELETE /wd/hub/session/967301ea-6ced-4801-9f5a-e3d6b68c2e7f {}
[debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: [""967301ea-6ced-4801-9f5a-e3d6b68c2e7f""]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1503059101119 (09:25:01 GMT-0300 (Hora oficial do Brasil))
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Stopping chromedriver for context WEBVIEW_br.com.bematech.staff
[debug] [Chromedriver] Changed state to 'stopping'
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/98599620f036c57ea39d899794f9b5c0] with no body
[debug] [JSONWP Proxy] Got response with status 200: ""{\""sessionId\"":\""98599620f036c57ea39d899794f9b5c0\"",\""status\"":0,\""value\"":null}""
[debug] [Chromedriver] Changed state to 'stopped'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\android-sdk\platform-tools\adb.exe' with args: [""-P"",5037,""-s"",""192.168.104.101:5555"",""shell"",""am"",""force-stop"",""br.com.bematech.staff""]
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running 'C:\android-sdk\platform-tools\adb.exe' with args: [""-P"",5037,""-s"",""192.168.104.101:5555"",""shell"",""input"",""keyevent"",3]
[debug] [AndroidBootstrap] Sending command to android: {""cmd"":""shutdown""}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {""cmd"":""shutdown""}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {""status"":0,""value"":""OK, shutting down""}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
</code></pre>

<p>This is my folder structure:</p>

<p>--tests
 conf.js
 spec.js</p>

<p>conf.js</p>

<pre><code> exports.config={
    seleniumAddress:'http://localhost:4723/wd/hub',
    specs:['spec.js'],
    capabilities: {
        platformName: 'android',
        platformVersion: '7.0',
        deviceName: 'Nexus',
        browserName: """",
        autoWebview: true,

        app: 'C:\\appium_drivers\\apks\\android-release.apk'
    },
    baseUrl: '127.0.0.1:4723',

    onPrepare: function () {
        let wd = require('wd'),
            protractor = require('protractor'),
            wdBridge = require('wd-bridge')(protractor,wd);
        wdBridge.initFromProtractor(exports.config);
    }
};
</code></pre>

<p>spec.js</p>

<pre><code>  describe('firstSpecStaff',function () {

          browserName = onPrepare('0.0.0.0', port);
          it('makelogin',function () {
          element(by.id('user')).sendKeys('admin@admin');
          element(by.id('password')).sendKeys('admin');
        });
 });
</code></pre>
",https://stackoverflow.com/questions/45759038/protractor-e2e-testing-e-launcher-error-error-cannot-find-module-wd,"['javascript', 'protractor', 'android-webview', 'appium', 'e2e-testing']",1419,FALSE,0,1
Can&#39;t select element from drop down menu E2E testing using Protractor,"<p>There's quite a few ways to do this and I've tried a good number of them but I can't select an item from a drop down menu when doing an automated test.</p>

<p>""Select"" is the default choice that appears in the drop down menu, I want the automated test to pick one of the elements, doesn't matter which one</p>

<p>This is the HTML Code</p>

<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-html lang-html prettyprint-override""><code>&lt;select class=""form-control ng-pristine ng-invalid ng-invalid-required"" ng-model=""user.investmentAmount"" required="""" ng-class=""{submitted:invalid}""&gt;
                   &lt;option value=""""&gt;Select&lt;/option&gt;
                   &lt;option value=""&lt;50""&gt; 50K&lt;/option&gt;
                   &lt;option value=""50-100""&gt;100K&lt;/option&gt;
                   &lt;option value=""100-250""&gt;250K&lt;/option&gt;
                   &lt;option value=""250-500""&gt;500K&lt;/option&gt;
                  &lt;/select&gt;</code></pre>
</div>
</div>
</p>

<p>And this is my Protractor file</p>

<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-js lang-js prettyprint-override""><code>var selectDropdownbyNum = function ( element, optionNum ) {
    if (optionNum){
      var options = element(by.cssContainingText(""Select""))  
        .then(function(options){
          options[2].click();
        });
    }
  };
  browser.sleep(2000);</code></pre>
</div>
</div>
</p>

<p>I've tried using by.cssElement, by.xpath etc.
When I run the above, I get no errors but it doesn't select any element either.
Thanks</p>
",https://stackoverflow.com/questions/43495519/cant-select-element-from-drop-down-menu-e2e-testing-using-protractor,"['node.js', 'jasmine', 'protractor', 'angularjs-e2e', 'e2e-testing']",1039,FALSE,0,3
Protractor Angular 2 e2e testing: Find element and perform action after login,"<p>I just new into e2e testing with protractor in angular 2. I'm having problems finding an element after login and perform an action on it (click).</p>

<p>After login it builds the page with message-components which are in a parent message-component. When running the test looking for the parent component it succeeds, running the second test finding the child component and perform an action it succeeds as wel. But when removing the first test it fails. I am testing on component level and I only want to test the necessary. The first test shouldn't be necessary here. See code:</p>

<pre><code>declare var by: any;
declare var browser: any;
declare var element: any;

function login() {

    let usernameInput = element(by.css(""input[name=\""username\""]""));
    let passwordInput = element(by.css(""input[name=\""password\""]""));
    let submit = element(by.css(""button[type=\""submit\""]""));

    usernameInput.sendKeys(""Username"");
    passwordInput.sendKeys(""welcome"");

    submit.click();
}

describe(""my-App"", function () {
    let page: WebPage;

    beforeEach(() =&gt; {
        page = new WebPage();
    });

    // If I remove this it doesnt work
    it(""If we provide credentials to the login form we should be authenticated and login"", () =&gt; {
        page.navigateTo();
        login();
        expect(element(by.css(""parent-element"")).isPresent()).toBe(true);
    });

    it(""should open conversation-component when clicking on a message"", () =&gt; {
        page.navigateTo();
        // Do login here when the first it() is removed.
        // login();

        element(by.css(""parent-element"")).isPresent().then(function () {
            let message = element.all(by.css("".child-message"")).first()
            message.click();
        });

        /* 
        == not working either ==
        browser.wait(element(by.css(""parent-component"")).isPresent(), 5000).then(function () {
            element.all(by.css("".child-message"")).first().click();
        }); 
        */

    })

    expect(element(by.css(""conversation-component"")).isPresent()).toBe(true);
});
</code></pre>

<p>Don't really understand the control flow. Retrieving messages takes a few seconds. I played around with the timeout in the config but nothing. </p>
",https://stackoverflow.com/questions/42698680/protractor-angular-2-e2e-testing-find-element-and-perform-action-after-login,"['angular', 'protractor', 'e2e-testing', 'angularjs-e2e']",1374,TRUE,1,1
e2e testing of an Angular app that uses (customer requirement) Firefox 38,"<p>My customer is using Firefox 38 and I need to conduct e2e test of and Angular application.  I am struggling understanding which version of Protractor and Selenium I should install to get Selenium to recognize the FF 38 browser.</p>
",https://stackoverflow.com/questions/44011355/e2e-testing-of-an-angular-app-that-uses-customer-requirement-firefox-38,"['selenium', 'firefox', 'protractor']",16,FALSE,-3,1
What docker image use for ionic CD / e2e testing? Ubuntu or just node?,"<p>I want to enable continuous delivery for one ionic project. 
I am going to use <a href=""https://bitbucket.org/product/features/pipelines"" rel=""nofollow noreferrer"">Bitbucket pipelines</a> which use Docker images.</p>

<p>I confused which Docker image I should use for the container.</p>

<p>Is it enough a node image or do I need a ubuntu image?
I might have to create my own image but what should be the base of that image.</p>

<p>Before running the end to end testing I will have to run few commands. e.g:</p>

<ul>
<li>pull from git master branch</li>
<li>npm install</li>
<li>npm install -g cordova ionic</li>
<li>bower install</li>
<li>run a gulp task</li>
<li>run protractor test</li>
</ul>

<p>The ionic project is also publish as a <em>webapp</em>, I deploy it to production from an Ubuntu 16.04 server (but served with ngnix) which make me think it is a good idea to have same environment in <em>dev</em> and <em>prod</em>.</p>

<p>With all of this, what should it be my Docker base image?</p>

<ul>
<li><a href=""https://hub.docker.com/_/node/"" rel=""nofollow noreferrer"">node:boron</a></li>
<li><a href=""https://hub.docker.com/_/ubuntu/"" rel=""nofollow noreferrer"">ubuntu:16.04</a></li>
</ul>

<p>In case both are valid options wouldn't be node image faster to build than ubuntu?</p>
",https://stackoverflow.com/questions/42956740/what-docker-image-use-for-ionic-cd-e2e-testing-ubuntu-or-just-node,"['docker', 'ionic-framework', 'e2e-testing', 'continuous-delivery', 'bitbucket-pipelines']",93,FALSE,1,0
React styled-component / e2e testing: What is the best way to use css selector?,"<p>I use <a href=""https://www.styled-components.com/"" rel=""nofollow noreferrer"">styled-components</a> in a react app and I got a problem with e2e testing.</p>

<p>Since styled-components generates hashed classes, it's hard to use <a href=""http://nightwatchjs.org/api"" rel=""nofollow noreferrer"">nightwatch</a> css selectors.</p>

<p>Is it possible to add prefix to generated classes so I could use .attributeContains() assertion?</p>

<p>Or is there a better solution ?</p>
",https://stackoverflow.com/questions/47208413/react-styled-component-e2e-testing-what-is-the-best-way-to-use-css-selector,"['reactjs', 'nightwatch.js', 'styled-components']",979,TRUE,4,2
Error: TSError: ⨯ Unable to compile TypeScript,"<p>I am facing the problem: </p>

<p><strong>My Project is built on Angular4 with typescript, e2e testing with protractor &amp; karma.</strong></p>

<p>Travis-ci has this error:</p>

<pre><code>[03:34:54] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'jasmine'. (2688)
Cannot find type definition file for 'node'. (2688)
e2e/app.e2e-spec.ts (1,32): Cannot find module './app.po'. (2307)
e2e/app.e2e-spec.ts (4,1): Cannot find name 'describe'. (2304)
e2e/app.e2e-spec.ts (7,3): Cannot find name 'beforeEach'. (2304)
e2e/app.e2e-spec.ts (11,3): Cannot find name 'it'. (2304)
e2e/app.e2e-spec.ts (13,5): Cannot find name 'expect'. (2304)

The command ""ng e2e"" exited with 4.
</code></pre>

<p>My tsconfig.json:</p>

<pre><code>{
  ""compileOnSave"": false,
  ""compilerOptions"": {
    ""outDir"": ""./dist/out-tsc"",
    ""baseUrl"": ""."",
    ""paths"": {
      ""*"": [""./node_modules/*"", ""*""]
    },
    ""sourceMap"": true,
    ""declaration"": false,
    ""moduleResolution"": ""node"",
    ""emitDecoratorMetadata"": true,
    ""experimentalDecorators"": true,
    ""target"": ""es5"",
    ""types"": [ ""node"", ""jasmine"" ],
    ""typeRoots"": [
      ""./node_modules/@types""
    ],
    ""lib"": [
      ""es2016"",
      ""dom""
    ]
  }
}
</code></pre>

<p>My tsconfig.spec.json:</p>

<pre><code>{
  ""compilerOptions"": {
    ""sourceMap"": true,
    ""declaration"": false,
    ""moduleResolution"": ""node"",
    ""emitDecoratorMetadata"": true,
    ""experimentalDecorators"": true,
    ""lib"": [
      ""es2016"",
      ""dom""
    ],
    ""outDir"": ""../out-tsc/spec"",
    ""module"": ""commonjs"",
    ""target"": ""es5"",
    ""baseUrl"": """",
    ""types"": [
      ""jasmine"",
      ""node""
    ],
    ""typeRoots"": [
      ""../node_modules/@types""
    ]
  },
  ""files"": [
    ""test.ts""
  ],
  ""include"": [
    ""**/*.spec.ts""
  ]
}
</code></pre>

<p><strong>Node v6.10.3</strong></p>

<p><strong>npm v3.10.10</strong></p>

<p>Please help me.</p>
",https://stackoverflow.com/questions/44965071/error-tserror-%e2%a8%af-unable-to-compile-typescript,"['node.js', 'angular', 'typescript', 'protractor', 'travis-ci']",129442,TRUE,40,8
How to end-to-end test my React.js code?,"<p>I try to use Selenium webdriver.io for E2E testing but implementation was relatively hard.</p>

<p>Is there any other way to do it?</p>

<p>Thanks</p>
",https://stackoverflow.com/questions/46991692/how-to-end-to-end-test-my-react-js-code,"['javascript', 'reactjs', 'selenium', 'testing', 'end-to-end']",116,FALSE,0,0
Docker idle after restart local machine,"<p>I am new to use docker configured PHPLaravel project. And am using Laravel DUSK e2e testing automation. 
Currently am running test from PHP storm. </p>
",https://stackoverflow.com/questions/46946842/docker-idle-after-restart-local-machine,"['docker', 'laravel-5.3', 'laravel-dusk']",14,FALSE,0,0
Webdriver io autocomplete in VS Code,"<p>I'm using Webdriver IO as the e2e testing framework. But this autocomplete issue is really slowing me down. <strong>VS Code doesn't auto complete the global variable <code>browser</code> and it's methods.</strong> </p>

<p><strong>.eslintrc</strong></p>

<pre><code>{
    ""extends"": [""eslint:recommended"", ""standard""],
    ""parser"": ""babel-eslint"",
    ""plugins"": [
        ""mocha"",
        ""webdriverio""
    ],
    ""env"": {
        ""webdriverio/wdio"": true,
        ""mocha"": true
    },
    ""parserOptions"": {
      ""ecmaVersion"": 8,
      ""sourceType"": ""module""
    },
    ""rules"": {
        ""indent"": [""error"", 4]
    }
}
</code></pre>

<p><strong>.babelrc</strong></p>

<pre><code>{
  ""presets"": [""es2015""],
  ""plugins"": [
    [""transform-runtime"", {
      ""polyfill"": false
    }]
  ]
}
</code></pre>
",https://stackoverflow.com/questions/47984407/webdriver-io-autocomplete-in-vs-code,"['selenium', 'visual-studio-code', 'webdriver-io']",2565,TRUE,1,1
AngularJS 1.x.x. List all active controllers into browser&#39;s console,"<p>Is there a way to list all active controller names into console? Need this for external E2E testing, to check if controller has loaded without waiting for DOM to fully render.</p>
",https://stackoverflow.com/questions/41980521/angularjs-1-x-x-list-all-active-controllers-into-browsers-console,['angularjs'],54,FALSE,1,1
how to generate logs using log4js-protractor-appender in angular/cli project using typescript,"<p>i have tried using log4js-protractor-appender for e2e testing using protractor in angular cli project by following link <a href=""https://stackoverflow.com/questions/41700764/writing-a-log-file-for-protractor-jasmine-tests-without-using-command-line"">Writing a log file for Protractor/Jasmine tests without using command line</a></p>
",https://stackoverflow.com/questions/45816477/how-to-generate-logs-using-log4js-protractor-appender-in-angular-cli-project-usi,['protractor'],483,FALSE,0,1
Browserstack locale error while running e2e test using protractor in jenkins :Locale error:Couldn&#39;t connect to files,"<p>I am using  browser stack plugin in Jenkins for e2e testing using protractor.
E2e is working fine locally but when deployed in Jenkins run e2e test getting the following error.</p>

<pre><code>Connecting local error { LocalError: Could not connect to Files!
at C:\Program Files (x86)\Jenkins\workspace\Angular UI Toolkit\node_modules     \browserstack-local\lib\Local.js:57:20
at ChildProcess.exithandler (child_process.js:197:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
name: 'LocalError',
message: 'Could not connect to Files!',
extra: undefined }
</code></pre>

<p>This is my browser stack.config file.</p>

<pre><code>    var browserstack = require('browserstack-local');

    exports.config = {
    'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
    baseUrl: 'http://localhost:3000/',

    ignoreSynchronization: false,
    framework: 'jasmine',

    allScriptsTimeout: 110000,
    getPageTimeout: 50000,
    jasmineNodeOpts: {
    // showTiming: true,
    showColors: true,
    isVerbose: false,
    includeStackTrace: false,
    defaultTimeoutInterval: 5000000
     },
      specs: [
       './dist/demo-app/**/*.e2e-spec.js'
       ],

       exclude: [],

       'capabilities': {
       'browserstack.user': 'username',
       'browserstack.key': 'key',
       'browserstack.local': true,
       'browserstack.localIdentifier':'test123',
       'os': 'Windows',
       'os_version': '8.1',
      'browserName': 'IE',
      'browser_version': '11.0'
      },

      // Code to start browserstack local before start of test
      beforeLaunch: function(){
       console.log(""Connecting local"");
        return new Promise(function(resolve, reject){
        exports.bs_local_args = {
          key: exports.config.capabilities['browserstack.key'],
          localIdentifier:exports.config.capabilities['browserstack.localIdentifier'],
          force: true
        };
      exports.bs_local = new browserstack.Local();
       console.log('exports.bs_local BROWSERSTACK_USERNAME...',process.env.BROWSERSTACK_USERNAME);
       console.log('exports.bs_local...',exports.bs_local);
      exports.bs_local.start(exports.bs_local_args, function(error) {

        if (error){
          console.log(""Connecting local error"",error);
          return reject(error);
        } 

        console.log('Connected. Now testing...');

        resolve();
      });
    });
  },

      // Code to stop browserstack local after end of test
      afterLaunch: function(){
        return new Promise(function(resolve, reject){
          exports.bs_local.stop(resolve);
        });
       },
         useAllAngular2AppRoots: true
     };
</code></pre>
",https://stackoverflow.com/questions/42948051/browserstack-locale-error-while-running-e2e-test-using-protractor-in-jenkins-lo,"['jenkins', 'browserstack']",517,FALSE,2,1
Javascript - Protractor - Clicking a checkbox terms &amp; conditions?,"<p>I'm very fresh to the angular testing and please help to write the protractor angular e2e testing code to below term and condition checkbox.</p>

<p>create profile button will be enable when the check box is clicked only.</p>

<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-html lang-html prettyprint-override""><code>//when clicked the checkbox

&lt;md-checkbox ng-model=""terms"" aria-label=""Terms &amp;amp; Conditions"" required="""" tabindex=""0"" type=""checkbox"" role=""checkbox"" class=""md-checked ng-not-empty ng-dirty ng-valid-parse ng-valid ng-valid-required ng-touched"" aria-required=""true"" aria-checked=""true"" aria-invalid=""false"" style=""""&gt;&lt;div class=""md-container md-ink-ripple"" md-ink-ripple="""" md-ink-ripple-checkbox=""""&gt;&lt;div class=""md-icon""&gt;&lt;/div&gt;&lt;div class=""md-ripple-container""&gt;&lt;/div&gt;&lt;/div&gt;&lt;div ng-transclude="""" class=""md-label""&gt;&lt;span class=""ng-scope""&gt;
          I agree to example&lt;/span&gt;&lt;a target=""_blank"" href=""https://example.com/"" class=""ng-scope""&gt;Terms &amp;amp; Conditions&lt;/a&gt;
        &lt;/div&gt;&lt;/md-checkbox&gt;  		
		
		
		
		
//when not clicked the checkbox
	
&lt;md-checkbox ng-model=""terms"" aria-label=""Terms &amp;amp; Conditions"" required="""" tabindex=""0"" type=""checkbox"" role=""checkbox"" class=""ng-dirty ng-valid-parse ng-touched ng-empty ng-invalid ng-invalid-required"" aria-required=""true"" aria-checked=""false"" aria-invalid=""true"" style=""""&gt;&lt;div class=""md-container md-ink-ripple"" md-ink-ripple="""" md-ink-ripple-checkbox=""""&gt;&lt;div class=""md-icon""&gt;&lt;/div&gt;&lt;div class=""md-ripple-container""&gt;&lt;/div&gt;&lt;/div&gt;&lt;div ng-transclude="""" class=""md-label""&gt;&lt;span class=""ng-scope""&gt;
          I agree to example &lt;/span&gt;&lt;a target=""_blank"" href=""https://example.com/"" class=""ng-scope""&gt;Terms &amp;amp; Conditions&lt;/a&gt;
        &lt;/div&gt;&lt;/md-checkbox&gt;</code></pre>
</div>
</div>
</p>
",https://stackoverflow.com/questions/41485077/javascript-protractor-clicking-a-checkbox-terms-conditions,"['javascript', 'jquery', 'angularjs', 'checkbox', 'protractor']",577,FALSE,0,2
angular protractor error - Failed: ETIMEDOUT connect ETIMEDOUT 127.0.0.1:56018,"<p>I am doing e2e testing using protractor of one of my page and some time I get <code>Failed: ETIMEDOUT connect ETIMEDOUT 127.0.0.1:56018</code> error. </p>

<p>Some time it also passes without any error. I have no clue whats going on!</p>

<p>The full error:</p>

<pre><code>Failed: ETIMEDOUT connect ETIMEDOUT 127.0.0.1:56018
Error: ETIMEDOUT connect ETIMEDOUT 127.0.0.1:56018
at ClientRequest.&lt;anonymous&gt; (/Users/pro1/node_modules/selenium-webdriver/http/index.js:238:15)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at Socket.socketErrorListener (_http_client.js:401:9)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)Error
at ElementArrayFinder.applyAction_ (/Users/pro1/node_modules/protractor/lib/element.ts:482:23)
at ElementArrayFinder.(anonymous function).args [as getText] (/Users/pro1/node_modules/protractor/lib/element.ts:96:21)
at ElementFinder.(anonymous function).args [as getText] (/Users/pro1/node_modules/protractor/lib/element.ts:873:14)
at /Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:107:37
at step (/Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:47:23)
at Object.next (/Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:28:53)
at fulfilled (/Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:19:58)
at &lt;anonymous&gt;
at process._tickCallback (internal/process/next_tick.js:188:7)
From asynchronous test:
    Error
at Suite.&lt;anonymous&gt; (/Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:62:3)
at addSpecsToSuite (/Users/pro1/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1107:25)
at Env.describe (/Users/pro1/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1074:7)
at describe (/Users/pro1/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4399:18)
at Object.&lt;anonymous&gt; (/Users/pro1/e2e/app/data-entity/sme/sme.e2e-spec.ts:30:1)
at Module._compile (module.js:624:30)
at Module.m._compile (/Users/pro1/node_modules/ts-node/src/index.ts:392:23)
at Module._extensions..js (module.js:635:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Users/pro1/node_modules/ts-node/src/index.ts:395:12)
</code></pre>
",https://stackoverflow.com/questions/46573580/angular-protractor-error-failed-etimedout-connect-etimedout-127-0-0-156018,"['angular', 'protractor', 'angular-e2e', 'angular-test']",2012,FALSE,1,2
Selenium locating input (Angular.JS),"<p>I just started using Selenium to automate e2e testing. How am I able to locate following input?</p>

<pre><code>&lt;input type=""text"" class=""input-xlarge ng-pristine ng-invalid ng-invalid-required"" data-ng-model=""model.campaign.name"" required="""" data-ng-disabled=""model.isDisabled""&gt;
</code></pre>

<p>So far tried to get the input by locating @ng-repeat, unfortunately with no luck. And the class can't work :)</p>

<pre><code>browser.find_element_by_xpath(""//*[@ng-repeat='model.campaign.name']"")
</code></pre>
",https://stackoverflow.com/questions/47561175/selenium-locating-input-angular-js,"['angularjs', 'selenium']",140,TRUE,-1,1
Elementor is not starting,"<p>I have installed Elementor for protractor e2e testing. as descibed <a href=""https://github.com/andresdominguez/elementor"" rel=""nofollow noreferrer"">here</a>. But whenever I start it like this, I get following results. </p>

<pre><code>E:\Work\test&gt;elementor https://angularjs.org
Creating protractor configuration file
Starting protractor
Running command: [node C:\Users\Vikash777\AppData\Roaming\npm\node_modules\elementor\node_modules\protractor\built\cli.js --elementExplorer true --debuggerServerPort 6969 C:\Users\VIKASH~1\AppData\Local\Temp\protractor-conf117814-7776-q2aq5m.jdozu84cxr]

E:\Work\test&gt;
</code></pre>

<p><strong>UPDATE</strong></p>

<p>There I have started Selenium server in separate windows</p>

<p><a href=""https://i.stack.imgur.com/yDej9.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/yDej9.png"" alt=""enter image description here""></a></p>

<p>It does not start Elementor..</p>
",https://stackoverflow.com/questions/46217485/elementor-is-not-starting,"['protractor', 'elementor']",317,FALSE,0,2
How to start e2e tests after creating a new aurelia project,"<p>So  I created a new project with aurelia-cli and selected protractor for e2e testing, I expected to have a command similar to <code>au karma</code> for running e2e tests but there is none.</p>

<p>How do I run the e2e test?</p>
",https://stackoverflow.com/questions/45951622/how-to-start-e2e-tests-after-creating-a-new-aurelia-project,['aurelia'],148,TRUE,0,2
Error when chaining expect in protractor,"<p>I'm using protractor for e2e testing on an Angular application.</p>

<p>With this test:</p>

<pre><code>it('Environnement et logo sont affichés', () =&gt; {
  browser.refresh();

  expect(dashboard.getTextByCss('.tag-css')).toEqual('value');
  expect(dashboard.getElementByCss('img[src*=\'image-name.png\']').isPresent()).toBe(true);
});
</code></pre>

<p>I have this pending status:</p>

<p><a href=""https://i.stack.imgur.com/l7wWo.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/l7wWo.png"" alt=""Pending status screenshot""></a></p>

<p>If I comment one of <strong>expect</strong> instruction, no pending status, the test succeed.
Please what can be the problem?</p>
",https://stackoverflow.com/questions/47829670/error-when-chaining-expect-in-protractor,"['angular', 'selenium', 'jasmine', 'protractor', 'e2e-testing']",90,FALSE,0,0
How to click and enter values in dynamic text area in protractor?,"<p>I am using protractor for angular 4 application e2e testing.</p>

<p>In the application code, I am not able to find the unique id, class, name, text for the textarea which is placed in my application.</p>

<p>Please help me to get unique xpath.</p>

<pre><code>&lt;textarea maxlength=""250"" pinputtextarea="""" required="""" ng-reflect-rows=""2"" 
ng-reflect-cols=""50"" ng-reflect-required="""" ng-reflect-maxlength=""250"" 
ng-reflect-model=""Test description 2"" class=""ui-inputtext ui-corner-all 
ui-state-default ui-widget ng-pristine ui-state-filled ng-valid ng-touched""
rows=""2"" cols=""50""&gt;
&lt;/textarea&gt;
</code></pre>
",https://stackoverflow.com/questions/47093164/how-to-click-and-enter-values-in-dynamic-text-area-in-protractor,"['angular', 'typescript', 'jasmine', 'protractor', 'e2e-testing']",552,TRUE,-3,1
Pass parameters for each browser using Protractor,"<p>Just got started with Protractor for E2E testing.</p>

<p>I want to pass parameters (login and password) for each instance of chrome selenium server.
I want test the same spec file with different user account in parallel.</p>

<p>This is my conf.js : </p>

<pre><code> capabilities: {
        'browserName': 'chrome',
        'chromeOptions': {
            'args': ['--disable-web-security']
        },
        count: 10
    },
</code></pre>
",https://stackoverflow.com/questions/45372767/pass-parameters-for-each-browser-using-protractor,"['selenium', 'protractor']",3302,TRUE,0,2
"ReferenceError: Can&#39;t find variable: require. [karma, webpack]","<p>I am trying to setup karma for E2E testing of my Vue js app , but when I try to run npm test I get this error</p>

<pre><code>PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
ReferenceError: Can't find variable: require
at index.js:1
</code></pre>

<p>I am following official vue documentation on testing
<a href=""https://vue-loader.vuejs.org/en/workflow/testing.html"" rel=""nofollow noreferrer"">https://vue-loader.vuejs.org/en/workflow/testing.html</a></p>

<p>karma.config.js</p>

<pre><code>var webpackConfig = require('../webpack.test.config.js')

// karma.conf.js
module.exports = function (config) {
  config.set({
    browsers: ['PhantomJS'],
    frameworks: ['jasmine'],
    // this is the entry file for all our tests.
    files: ['./index.js'],
    // we will pass the entry file to webpack for bundling.
    preprocessors: {
      './test/index.js': ['webpack']
    },
    // use the webpack config
    webpack: webpackConfig,
    // avoid walls of useless text
    webpackMiddleware: {
      noInfo: true
    },
    singleRun: true
  })
}

//index.js referenced in above karma config
var testsContext = require.context('.', true, /\.spec$/)    
testsContext.keys().forEach(testsContext)

//webpack.test.config.js
const webpack = require('webpack');
const path = require('path');
const projectRoot = path.resolve(__dirname, '../');

module.exports = {

  module: {

    loaders: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
      },
      {
        test: /\.js$/,
        loader: 'babel-loader',
        query: {
          presets: ['es2015']
        },
        include: [
          projectRoot,
        ],
        exclude: /node_modules/,
      },
    ],
  },
  plugins: [
   new webpack.ProvidePlugin({
      $: ""jquery"",
      jQuery: ""jquery""
    })
  ],
  resolve: {
    extensions: ['.js', '.vue'],
  },
};
</code></pre>
",https://stackoverflow.com/questions/44677024/referenceerror-cant-find-variable-require-karma-webpack,"['testing', 'webpack', 'vue.js', 'mocha.js', 'karma-runner']",2928,TRUE,0,1
How to select a particular textbox(with ng-model) in protractor testing,"<p>Html Code</p>

<pre><code>&lt;li ng-repeat=""(i,x) in array""&gt;

    {{x.title}} &lt;button ng-click=""how(x)""&gt;Edit&lt;/button&gt;
    &lt;/div&gt;
    &lt;div ng-show=""x.show"" ng-model='x.form'&gt;
        &lt;form name=""hola""&gt;
            Darsh: &lt;input type='text' ng-model='x.title'&gt;
        &lt;/form&gt;
&lt;/li&gt;
</code></pre>

<p>I have binded the input elements with objects, to send info to the backend
I want to do e2e testing for the same.
So I do I select the particular textbox from each element of the array, if I have multiple elements?</p>

<p>Test case in protractor</p>

<pre><code>var elem = element.all(by.repeater('(i,x) in array')).get(1);
 elem.element(by.css('button[ng-click=""how(x)""]')).click();
 var title = element.all(by.repeater('(i,x) in array')).get(1);
 title.element(by.model('x.title')).clear();
 title.element(by.id('x.title')).sendKeys('how');
</code></pre>
",https://stackoverflow.com/questions/42408302/how-to-select-a-particular-textboxwith-ng-model-in-protractor-testing,"['angularjs', 'testing', 'protractor']",446,FALSE,1,0
Angular E2E Test with Code Coverage,"<p>I am using Angular v4 with angular-cli to build.  We are just starting to look at e2e testing.  The CLI recommends protractor.  Is there anyway to get code coverage for protractor e2e test?  Only things I have found so far is to use grunt.  Really would like to stick with angular-cli.</p>
",https://stackoverflow.com/questions/43622093/angular-e2e-test-with-code-coverage,"['angular', 'protractor', 'code-coverage', 'angular-cli']",799,FALSE,2,1
using protractor with Aurelia gives error,"<p>I am trying to do e2e testing with protractor for aurelia project. 
<code>this is my protactor.conf.js</code></p>

<pre><code>exports.config = {
  directConnect: true,

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'chrome'
  },

  //seleniumAddress: 'http://0.0.0.0:4444',
  // add proper version number
  seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.44.0.jar',
  specs: ['test/e2e/dist/**/*.ts'],

  plugins: [{
    path: 'aurelia.protractor.js'
  }],


  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
  }
};
</code></pre>

<p>this is demo.spec.ts</p>

<pre><code>import {PageObject_Welcome} from './welcome.po';
import {PageObject_Skeleton} from './skeleton.po';

describe('aurelia skeleton app', function() {
  let po_welcome: PageObject_Welcome;
  let po_skeleton: PageObject_Skeleton;

  beforeEach( () =&gt; {
    po_skeleton = new PageObject_Skeleton();
    po_welcome = new PageObject_Welcome();

    browser.loadAndWaitForAureliaPage(""http://localhost:9000"");
  });

  it('should load the page and display the initial page title', () =&gt; {
    expect(po_skeleton.getCurrentPageTitle()).toBe('Welcome | Aurelia');
  });

  it('should display greeting', () =&gt; {
    expect(po_welcome.getGreeting()).toBe('Welcome to the Aurelia Navigation App!');
  });

  it('should automatically write down the fullname', () =&gt; {
    po_welcome.setFirstname('Rob');
    po_welcome.setLastname('Eisenberg');

    // For now there is a timing issue with the binding.
    // Until resolved we will use a short sleep to overcome the issue.
    browser.sleep(200);
    expect(po_welcome.getFullname()).toBe('ROB EISENBERG');
  });

  it('should show alert message when clicking submit button', () =&gt; {
    expect(po_welcome.openAlertDialog()).toBe(true);
  });

  it('should navigate to users page', () =&gt; {
    po_skeleton.navigateTo('#/users');
    expect(po_skeleton.getCurrentPageTitle()).toBe('Github Users | Aurelia');
  });
});
</code></pre>

<p>when i run gulp watch , it run the project in the browser ,when i fyn gulp e2e ,
it gives the below error </p>

<p>events.js:160
      throw er; // Unhandled 'error' event
      ^</p>

<pre><code>Error: spawn C:\Automated_Testing\Vetserve.Web\src\Vetserve.Web.Appts\node_modu
es\.bin\protractor.cmd ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
</code></pre>

<p>can someone help me with this</p>
",https://stackoverflow.com/questions/43660584/using-protractor-with-aurelia-gives-error,"['protractor', 'aurelia', 'enoent']",260,TRUE,0,1
Testcafe Vue Selectors can&#39;t grab Vue component,"<p>I'm using Testcafe Vue Selectors to perform e2e testing on my Vue application but it looks like I can't grab any of my components:</p>

<pre><code>1) An error occurred in getVue code:

      TypeError: Cannot read property '__vue__' of undefined
</code></pre>

<p>This is a sample test I have created:</p>

<pre><code>import VueSelector from ""testcafe-vue-selectors"";
import { Selector } from 'testcafe';

fixture `Getting Started`
    .page `http://localhost:8081/`;

test('test totalValue format', async t =&gt; {
    const totalValue = VueSelector(""total-value"");

    await t
        .click(""#total-value-toggle-format"")
        .expect(totalValue.getVue(({ props }) =&gt; props.formatProperty)).eql(null)
});
</code></pre>

<p>The structure of my components tree is the following:</p>

<pre><code>Root
|___App
    |___Hello
        |___TotalValue
</code></pre>

<p>And I import the component like this:</p>

<pre><code>  ""total-value"": TotalValue,
</code></pre>

<p>Why is this not working?</p>

<p>EDIT: this is the page where I test the component</p>

<pre><code>&lt;template&gt;
    &lt;div class=""hello""&gt;
        &lt;div class=""component-wrapper""&gt;
              &lt;total-value
                  :value=""totalValueValue""
                  :formatProperty=""computedFormatNumber""&gt;
              &lt;/total-value&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/template&gt;

&lt;script&gt;   
import TotalValue from ""../../core/TotalValue"";

export default {
    name: ""hello"",
    components: {
        ""total-value"": TotalValue,
    },
    data() {
        return {
            totalValueValue: 1000000,
            formatNumber: true,
            formatFunction: Assets.formatNumber,
        };
    },
    computed: {
        computedFormatNumber() {
            return this.formatNumber ? [""nl"", ""0,0 a""] : [];
        },

    },
};
</code></pre>
",https://stackoverflow.com/questions/44585727/testcafe-vue-selectors-cant-grab-vue-component,"['javascript', 'vue.js', 'testing', 'automated-tests', 'testcafe']",791,TRUE,5,1
Angular2 e2e hangs in devmode,"<p>I'm e2e testing a angular application. When I use the angular-cli to start the, the e2e test get stuck after text is sent to a input element.</p>

<p>When I run it on a compiled aot version that is served from a nginx server it works. </p>

<p>There are no errors in the logs. </p>

<p>Any ideas?</p>
",https://stackoverflow.com/questions/46766322/angular2-e2e-hangs-in-devmode,"['angular', 'protractor', 'e2e-testing']",49,FALSE,0,0
c# chromedriver read logs and clear them,"<p>I am doing e2e testing using chrome-driver and selenium. As part of testing each page, I want to check console.logs to see if there are any errors and then before moving on to a new page, I want to clear the console logs.</p>

<p>I can read logs using </p>

<pre><code>  _driver.Manage().Logs.GetLog(LogType.Browser).ToList();
</code></pre>

<p>Is it possible to clear the console logs??</p>
",https://stackoverflow.com/questions/43396627/c-chromedriver-read-logs-and-clear-them,"['c#', 'selenium', 'selenium-chromedriver', 'console.log']",998,TRUE,0,1
Scoping issue with before in Mocha,"<p>I'm facing an issue regarding test setup and cleanup in <code>before</code> and <code>after</code> methods in <code>Mocha</code> testing.</p>

<p>I'm using <a href=""https://github.com/graphcool/chromeless"" rel=""nofollow noreferrer"">Chromeless</a> for e2e testing. For the easier implementation I moved my chrome launcher to a separate file (say <code>my-chrome-launcher.js</code>) by exporting an <code>async</code> function:</p>

<pre><code>var chromeLauncher = require('chrome-launcher');

module.exports = {
    launchChrome: async function(headless) {
        try {
            var flags = ['--disable-gpu'];

            if (headless) {
                flags = ['--headless', '--disable-gpu'];
            }

            let chrome = await chromeLauncher.launch({
                port: 9222,
                chromeFlags: flags
            });

            console.log(`Chrome debugging running on port ${chrome.port} with pid ${chrome.pid}`);
            return chrome;
        } catch (ex) {
            console.error(ex.messsage);
        }
    }
}
</code></pre>

<p><strong>simple.js</strong></p>

<pre><code>const {
    Chromeless
} = require('Chromeless')
var http = require('http');
var fs = require('fs');
var assert = require('assert');
const myChromeLauncher = require('./my-chrome-launcher.js');

describe('app', function() {

    describe('Top Results', function() {

        it('should return top results', async() =&gt; {
            chrome = await myChromeLauncher.launchChrome(true);
            chromeless = new Chromeless();

            const links = await chromeless
                .goto('https://www.google.com')
                .type('chromeless', 'input[name=""q""]')
                .press(13)
                .wait('#resultStats')
                .evaluate(() =&gt; {
                    // this will be executed in headless chrome
                    const links = [].map.call(
                        document.querySelectorAll('.g h3 a'),
                        a =&gt; ({ title: a.innerText, href: a.href })
                    )
                    return links;
                });
            // Assert
            assert.equal(links.length, 11);

            await chromeless.end();

            chrome.kill().catch(e =&gt; console.error(e));
        });
    });

});
</code></pre>

<p>The above test works well but when I want to use <code>before</code>, <code>beforeEach</code>, <code>after</code> or <code>afterEach</code> methods to share setup code like below I get an error:</p>

<pre><code> describe('app', function() {

     describe('Top Results', function() {
         var chrome;
         var chromeless;

         before(function() {
             chrome = await myChromeLauncher.launchChrome(true);
             chromeless = new Chromeless();
         });

 ....

         after(function() {
             await chromeless.end();
             chrome.kill().catch(e =&gt; console.error(e));
         });

});

});
</code></pre>

<p><strong>Error:</strong></p>

<pre><code>chrome = await myChromeLauncher.launchChrome(true);
               ^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
</code></pre>
",https://stackoverflow.com/questions/45565090/scoping-issue-with-before-in-mocha,"['javascript', 'node.js', 'testing', 'mocha.js', 'chromeless']",105,TRUE,0,1
common practice for testing an application with javascript client-side,"<p>I need to automate E2E testing for a web application. The front-end of the application is implemented using a JavaScript framework and the back-end is Java technology. I know there are tools/frameworks available for JavaScript testing. I'm wondering if I can use Java (such as java with selenium-webdriver) for my tests. Is it a common practice?</p>
",https://stackoverflow.com/questions/43789836/common-practice-for-testing-an-application-with-javascript-client-side,"['javascript', 'selenium-webdriver', 'integration-testing']",51,FALSE,0,1
Clickable But Not Visible?,"<p>I am fairly new to Protractor E2E testing and was wondering if it was possible for an element to be clickable (<code>ExpectedConditions.elementToBeClickable</code>) but not necessarily visible (<code>ExpectedConditions.visibilityOf</code>). </p>

<p>For example, I have the following code:</p>

<pre><code>    var EC = protractor.ExpectedConditions;
    var tryItButtonClickable = EC.elementToBeClickable(tryItButton);
    var tryItButtonVisible = EC.visibilityOf(tryItButton);

    return browser.wait(EC.and(tryItButtonClickable, tryItButtonVisible), getWaitTime())
        .then(function() {
             var protocol = url.parse(myarray[0].url).protocol;
                 if (protocol === null) {
                     throw new Error('expected ' + protocol + ' not to be null');
                 }
        })
</code></pre>

<p>Before adding the <code>tryItButtonVisible</code> piece, I would receive a time out error from Protractor, presumably because my <code>tryItButton</code> was clickable but hadn't been loaded into the DOM.</p>

<p>Is this true, or am I being redundant?</p>

<p>Thanks</p>
",https://stackoverflow.com/questions/45872003/clickable-but-not-visible,['protractor'],54,FALSE,1,1
Download file to given absolute path in Firefox using Protractor,"<p>Im using Protractor for E2E testing. During automation, I need to download files to C:\Automation folder in my system. But below code is not working.</p>

<p>Note:During automation execution,The Save as popup opens(but i have to disable that in future) and I manually click ""Save"" option. It saves in default location ie Downloads folder.How do I make it save in my given path.</p>

<pre><code>let profile = require('firefox-profile');        
let firefoxProfile = new profile();

//_browser = 'chrome';
_browser = 'firefox';
// _browser = 'internet explorer';

firefoxProfile.setPreference(""browser.download.folderList"", 2);
firefoxProfile.setPreference('browser.download.dir', ""C:\\Automation"");

exports.config = {
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
    'browserName': _browser,
    'shardTestFiles': false,
    'maxInstances': 1,
    'acceptInsecureCerts': true,
    'moz:firefoxOptions': {
    'profile': firefoxProfile
    }},
beforeLaunch: function () {...}
}
</code></pre>
",https://stackoverflow.com/questions/47838795/download-file-to-given-absolute-path-in-firefox-using-protractor,"['firefox', 'protractor', 'firefox-profile']",1112,FALSE,1,2
How to run google chrome headless in docker?,"<p>My problem is how to run google chrome in docker container for e2e testing.
I create a <code>Dockerfile</code> from official Jenkins image, but when try to run google chrome, it crashes and show the error:</p>

<pre><code>Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)
</code></pre>

<p>The Jenkins docker image uses Debian <code>jessie</code>.</p>

<p>I can run google chrome with <code>--headless</code> flag and the X server is not needed.</p>

<p>This is my docker file:</p>

<ul>
<li><a href=""https://github.com/ripper2hl/jenkinswithchrome"" rel=""noreferrer"">https://github.com/ripper2hl/jenkinswithchrome</a></li>
</ul>

<p>Jenkins official image:</p>

<ul>
<li><a href=""https://github.com/jenkinsci/docker"" rel=""noreferrer"">https://github.com/jenkinsci/docker</a></li>
</ul>

<p>The repo a person runs google chrome with GUI from docker:</p>

<ul>
<li><a href=""https://github.com/jessfraz/dockerfiles/blob/master/chrome/stable/Dockerfile"" rel=""noreferrer"">https://github.com/jessfraz/dockerfiles/blob/master/chrome/stable/Dockerfile</a></li>
</ul>

<p>My first approach is to use <code>xvbf</code>, but the process is more simple when used <code>--headless</code> flag.</p>

<ul>
<li><a href=""https://gist.github.com/addyosmani/5336747"" rel=""noreferrer"">https://gist.github.com/addyosmani/5336747</a></li>
</ul>

<p>I can run chrome in Ubuntu server with the same commands for installation, but in docker it fails.</p>

<p>After other intents, I used <code>--no-sandbox</code> flag, but docker images shows the next error.</p>

<pre><code>[0427/180929.595479:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected
[0427/180929.595537:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager detected
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Operation not permitted
</code></pre>

<p>Actually I ran this command:</p>

<p><code>google-chrome-stable --headless --disable-gpu --no-sandbox http://www.google.com</code></p>
",https://stackoverflow.com/questions/43665276/how-to-run-google-chrome-headless-in-docker,"['google-chrome', 'docker', 'jenkins', 'e2e-testing']",79184,TRUE,61,6
Cannot invoke an expression whose type lacks a call signature while Running protractor e2e,"<p>I'm working with an angular2 app where we have setup protractor for e2e testing, but unable to run e2e test cases with protractor and getting following error</p>

<pre><code>e2e/app/framework/element-functions.ts(43,29): error TS2349: Cannot invoke an expression whose type lacks a call signature.
e2e/app/framework/wait-functions.ts(45,18): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Promise&lt;{}&gt; | Condition&lt;{}&gt; | ((driver: WebDriver) =&gt; {})'.
Type 'Function' is not assignable to type '(driver: WebDriver) =&gt; {}'.
Type 'Function' provides no match for the signature '(driver: WebDriver): {}'
node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts(43,43): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/blockingproxy.d.ts(40,13): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(11,39): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(18,42): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(19,22): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts(17,43): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(14,47): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(21,52): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(29,56): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(37,52): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts(14,90): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts(23,43): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(31,22): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(48,26): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(62,25): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(76,28): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(94,55): error TS2304: Cannot find name 'Promise'.
</code></pre>

<p>Environment : windows 10 (64bit)
Node: 6.11.0
Npm: 3.8.6
Protractor: 5.1.2
webdriver: 2.53.33
chromedriver: 2.30
TypeScript: 2.4.1</p>

<p>I've searched the internet but couldn't found a useful solution for this. Anything do I need to change to get this working ?</p>
",https://stackoverflow.com/questions/45097016/cannot-invoke-an-expression-whose-type-lacks-a-call-signature-while-running-prot,"['node.js', 'typescript', 'selenium-webdriver', 'protractor', 'typescript2.0']",112,FALSE,0,0
protractor :don&#39;t wait for elements to appears in Dom,"<p>I do end to end test using protractor.When I start up the test this message appears to me </p>

<blockquote>
  <p>conFusion App E2E Testing menu 0 item should show the first comment author as
      Message:
        Failed: No element found using locator: by.model(""FiltText"")</p>
</blockquote>

<p>How can I make the protractor wait until element appears in the DOM?</p>

<p>the corresponding protractor configuration code is :</p>

<pre><code>  exports.config = {
    allScriptsTimeout:11000,

    specs: [
      'e2e/*.js'
      ],
  capabilities: {
     'browserName': 'chrome'
   },

baseUrl: 'http://localhost:3001/',

 framework: 'jasmine',
 directConnect: true,

 jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
 }
};
</code></pre>

<p>scenarios.js code that contain e2e test</p>

<pre><code> describe('menu 0 item', function() {
beforeEach(function() {

  browser.get('index.html#/menu/0');


});

it('should have a name', function() {
      var name = element(by.binding('dish.name'));
      expect(name.getText()).
         toEqual('Uthapizza Hot $4.99');
});

it('should show the number of comments as', function() {

    expect(element.all(by.repeater('comment in dish.comments'))
        .count()).toEqual(5);


});

it('should show the first comment author as', function() {
      element(by.model('FiltText')).sendKeys('author');

      expect(element.all(by.repeater('comment in dish.comments'))
        .count()).toEqual(5);

      var author = element.all(by.repeater('comment in dish.comments'))
                  .first().element(by.binding('comment.author'));

      expect(author.getText()).toContain('25 Cent');

}); 
  }); 
</code></pre>
",https://stackoverflow.com/questions/43307515/protractor-dont-wait-for-elements-to-appears-in-dom,"['angularjs', 'testing', 'protractor']",1378,TRUE,0,2
protractor :don&#39;t wait for repeater elements to appears in Dom,"<p>I do end to end test using protractor. I don't used Selenium WebDriver .I connected directly to charm browser. When I start up the test 2 errors occurred.the first one:</p>

<blockquote>
  <p>conFusion App E2E Testing menu 0 item should show the number of comments as
    Message:
      Expected 0 to equal 5.
    Stack:
      Error: Failed expectation</p>
</blockquote>

<p>the second one:</p>

<blockquote>
  <p>conFusion App E2E Testing menu 0 item should show the first comment author as
    Message:
      Failed: No element found using locator: by.model(""FiltText"")
    Stack:</p>
</blockquote>

<p>I used JSON  server  serve up the REST API for accessing the JSON data by my Angular application.there are five comments and filter to order the comments.
also I used gulp to serve up the Angular application. When I type in a  terminal gulp watch every-things worked right.but protractor is failed.</p>

<p>How can I make the protractor wait until element appears in the DOM?</p>

<p>the corresponding protractor configuration code is :</p>

<pre><code>exports.config = {
allScriptsTimeout:11000,

  specs: [
    'e2e/*.js'
     ],
  capabilities: {
   'browserName': 'chrome'
  },

   baseUrl: 'http://localhost:3001/',

   framework: 'jasmine',
   directConnect: true,

  jasmineNodeOpts: {
     showColors: true,
   defaultTimeoutInterval: 30000
  }
};
</code></pre>

<p>scenarios.js code that contain e2e test</p>

<pre><code>describe('menu 0 item', function() {
   beforeEach(function() {

     browser.get('index.html#/menu/0');


   });

   it('should have a name', function() {
   var name = element(by.binding('dish.name'));
   expect(name.getText()).
     toEqual('Uthapizza Hot $4.99');
 });

 it('should show the number of comments as', function() {

      expect(element.all(by.repeater('comment in dish.comments'))
       .count()).toEqual(5);


  });

   it('should show the first comment author as', function() {
      element(by.model('FiltText')).sendKeys('author');

     expect(element.all(by.repeater('comment in dish.comments'))
      .count()).toEqual(5);

    var author = element.all(by.repeater('comment in dish.comments'))
              .first().element(by.binding('comment.author'));

   expect(author.getText()).toContain('25 Cent');

 }); 
 }); 
</code></pre>

<p>The  partial code of Html page that I want to test :</p>

<pre><code>&lt;h4&gt; Customer Comments &amp;nbsp; 
                &lt;span style=""font-size:15px;""&gt;sorted by:&lt;input type=""text"" ng-model=""FiltText""&gt;&lt;/span&gt;&lt;/h4&gt;&lt;blockquote ng-repeat=""commet in dish.comments |orderBy:FiltText""&gt;
         &lt;h5&gt;{{commet.rating}} Stars&lt;/h5&gt;
         &lt;h5&gt;{{commet.comment}}&lt;/h5&gt;
         &lt;footer&gt;{{commet.author}}, &lt;span&gt;{{commet.date|date}}&lt;/span&gt;. &lt;/footer&gt;

            &lt;/blockquote&gt;
</code></pre>
",https://stackoverflow.com/questions/43315631/protractor-dont-wait-for-repeater-elements-to-appears-in-dom,"['javascript', 'angularjs', 'json', 'testing', 'protractor']",262,FALSE,0,1
Appium + Protractor + Android Device error timeout,"<p>I'm stuck at an error that I don't know exactly how to solve,
the problems comes from here:</p>

<p>[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: [""script"",11000,""bb157408-9234-4a81-a973-091bc4ccbe6d""]
[MJSONWP] Encountered internal error running command: Error: Invalid timeout 'script'</p>

<p>Why is sending as first parameter an ""script""?</p>

<p>I'm new on e2e testing.</p>

<p>Thank in advance.</p>

<p>This is my config:</p>

<p>e2e-test.conf.js:</p>

<pre><code>exports.config = {

    /*
    * normally protactor run tests on localhost:4444, but we want protactor to connet
    * appium wich runs on localhost:4723
    */
    seleniumAddress: 'http://localhost:4723/wd/hub',
    specs: ['e2e-tests/*.test.js'],
    /* 
    * Some capabilities must be set to make sure appium can connect to your deice.
    * platformVersion: this is the version of android
    * deviceName: your actual device name
    * browserName: leave this empty, we want protactor to use embeded webview
    * autoWebView: set this to true for hybrid applications
    * app: the location of the apk (must be absolute)
    */
    capabilities: {
        platformName: 'android',
        platformVersion: '5.1.1',
        deviceName: 'Nexus 4',
        browserName: '',
        autoWebView: true,
        app: '/Users/mikel/insurance/front/insurance/platforms/android/build/outputs/apk/android-debug.apk'
    },
        /* 
        * Default android localhost url
        */
        baseUrl: 'http://10.0.2.2:8000/',

        // configuring wd in onPrepare
  // wdBridge helps to bridge wd driver with other selenium clients
  // See https://github.com/sebv/wd-bridge/blob/master/README.md
  onPrepare: function () {
    var wd = require('wd'),
      protractor = require('protractor'),
      wdBridge = require('wd-bridge')(protractor, wd);
    wdBridge.initFromProtractor(exports.config);
  }

};
</code></pre>

<p>This is protractor output log:</p>

<pre><code>(node:7447) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[17:28:30] I/launcher - Running 1 instances of WebDriver
[17:28:30] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[17:29:12] E/runner - Unable to start a WebDriver session.
[17:29:15] E/launcher - Error: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Invalid timeout 'script'
    at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.manage().timeouts().setScriptTimeout(11000)
    at WebDriver.schedule (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:816:17)
    at Timeouts._scheduleCommand (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:1500:25)
    at Timeouts.setScriptTimeout (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:1483:17)
    at browser_.ready.browser_.ready.then.then (/usr/local/lib/node_modules/protractor/lib/runner.ts:281:49)
    at ManagedPromise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1366:14)
    at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2970:14)
    at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2953:27)
    at asyncRun (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2813:27)
    at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:676:7
    at process._tickCallback (internal/process/next_tick.js:103:7)
[17:29:15] E/launcher - Process exited with error code 100
</code></pre>

<p>This is Appium output log:</p>

<pre><code>[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""uiautomator"",""runtest"",""AppiumBootstrap.jar"",""-c"",""io.appium.android.bootstrap.Bootstrap"",""-e"",""pkg"",""com.ionicframework.insurance437011"",""-e"",""disableAndroidWatchers"",false,""-e"",""acceptSslCerts"",false]
[debug] [UiAutomator] Moving to state 'online'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Device API level: 22
[debug] [ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""am"",""start"",""-W"",""-n"",""com.ionicframework.insurance437011/com.ionicframework.insurance437011.MainActivity"",""-S"",""-a"",""android.intent.action.MAIN"",""-c"",""android.intent.category.LAUNCHER"",""-f"",""0x10200000""]
[debug] [ADB] Waiting for pkg: 'com.ionicframework.insurance437011' and activity: 'com.ionicframework.insurance437011.MainActivity' to be focused
[debug] [ADB] Possible activities, to be checked: com.ionicframework.insurance437011.MainActivity, .MainActivity, .com.ionicframework.insurance437011.MainActivity
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""dumpsys"",""window"",""windows""]
[debug] [ADB] Found package: 'com.ionicframework.insurance437011' and activity: '.MainActivity'
[Appium] New AndroidDriver session created successfully, session bb157408-9234-4a81-a973-091bc4ccbe6d added to master session list
[debug] [MJSONWP] Responding to client with driver.createSession() result: {""platform"":""LINUX"",""webStorageEnabled"":false,""takesScreenshot"":true,""javascriptEnabled"":true,""databaseEnabled"":false,""networkConnectionEnabled"":true,""locationContextEnabled"":false,""warnings"":{},""desired"":{""platformName"":""android"",""platformVersion"":""5.1.1"",""deviceName"":""Nexus 4"",""browserName"":"""",""autoWebView"":true,""app"":""/Users/mikel/insurance/front/insurance/platforms/android/build/outputs/apk/android-debug.apk"",""count"":1},""platformName"":""android"",""platformVersion"":""5.1.1"",""deviceName"":""04f4019957958336"",""browserName"":"""",""autoWebView"":true,""app"":""/Users/mikel/insurance/front/insurance/platforms/android/build/outputs/apk/android-debug.apk"",""count"":1,""deviceUDID"":""04f4019957958336"",""appPackage"":""com.ionicframework.insurance437011"",""appWaitPackage"":""com.ionicframework.insurance437011"",""appActivity"":""com.ionicframework.insurance437011.MainActivity"",""appWaitActivity"":""com.ionicframework.insurance437011.MainActivity""}
[HTTP] &lt;-- POST /wd/hub/session 200 220004 ms - 998 
[HTTP] --&gt; POST /wd/hub/session/bb157408-9234-4a81-a973-091bc4ccbe6d/timeouts {""type"":""script"",""ms"":11000}
[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: [""script"",11000,""bb157408-9234-4a81-a973-091bc4ccbe6d""]
[MJSONWP] Encountered internal error running command: Error: Invalid timeout 'script'
    at AndroidDriver.callee$0$0$ (../../../../lib/basedriver/commands/timeout.js:23:13)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at AndroidDriver.callee$0$0 [as timeouts] (../../../../lib/basedriver/commands/timeout.js:14:9)
    at ../../../lib/basedriver/driver.js:173:24
    at tryCatcher (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromiseAtPostResolution (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/promise.js:248:10)
    at Async._drainQueue (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)
[HTTP] &lt;-- POST /wd/hub/session/bb157408-9234-4a81-a973-091bc4ccbe6d/timeouts 500 9 ms - 195 
[HTTP] --&gt; DELETE /wd/hub/session/bb157408-9234-4a81-a973-091bc4ccbe6d {}
[debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: [""bb157408-9234-4a81-a973-091bc4ccbe6d""]
[debug] [AndroidDriver] Shutting down Android driver
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""am"",""force-stop"",""com.ionicframework.insurance437011""]
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""input"",""keyevent"",3]
[debug] [AndroidBootstrap] Sending command to android: {""cmd"":""shutdown""}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {""cmd"":""shutdown""}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {""status"":0,""value"":""OK, shutting down""}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""ps""]
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/mikel/Library/Android/sdk/platform-tools/adb' with args: [""-P"",5037,""-s"",""04f4019957958336"",""shell"",""am"",""force-stop"",""io.appium.unlock""]
[debug] [Logcat] Stopping logcat capture
[debug] [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[Appium] Removing session bb157408-9234-4a81-a973-091bc4ccbe6d from our master session list
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[debug] [MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] &lt;-- DELETE /wd/hub/session/bb157408-9234-4a81-a973-091bc4ccbe6d 200 3740 ms - 76 
</code></pre>
",https://stackoverflow.com/questions/42029111/appium-protractor-android-device-error-timeout,"['android', 'ionic-framework', 'protractor', 'appium']",952,TRUE,3,2
Folder structure of scala+node.js web application,"<p>I'm working on a small web-application with: </p>

<ol>
<li>some static pages </li>
<li>some js code (most of it node.js e2e testing)</li>
<li>a scala server</li>
</ol>

<p>what folder structure would you recommend? 
Should i separate the scala project from the html content and js code?
seems to me it should all be part of one project (which will later be one git repository) as the server will also retrieve the pages... 
Would appreciate any explained advise!</p>
",https://stackoverflow.com/questions/43438035/folder-structure-of-scalanode-js-web-application,"['javascript', 'node.js', 'scala', 'web']",45,FALSE,1,0
How to switch frames using Protractor,"<p>I know this has been asked multiple times, and the suggested solution has been to use something like <code>browser.driver.switchTo('your-frame-name')</code> but I can't seem to access the same switchTo() method in my code. </p>

<p>This is my test :</p>

<pre><code>import { AppPage } from './app.po';
import {browser, by, element} from 'protractor';

describe('angular-test App', () =&gt; {
  let page: AppPage;

  beforeEach(() =&gt; {
    page = new AppPage();
  });

  it('should display welcome message', () =&gt; {
    page.navigateTo();
    browser.driver.switchToParentFrame()

    //expect(page.getParagraphText()).toEqual('Welcome to app!');
    expect(element(by.id('myHeader')).getText()).toEqual('Welcome to Angular Test App!  ');
  });
});
</code></pre>

<p><code>switchToParentFrame()</code> is the only available method I get after the browser.driver. </p>

<p>This is how my HTML looks like</p>

<p><a href=""https://i.stack.imgur.com/0N2dy.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/0N2dy.png"" alt=""enter image description here""></a></p>

<p>Any help is appreaciated, sorry for the vague description of the question but I'm pretty new to coding/protractor e2e testing. </p>
",https://stackoverflow.com/questions/47584051/how-to-switch-frames-using-protractor,"['angularjs', 'selenium-webdriver', 'protractor', 'e2e-testing']",5494,TRUE,1,3
Anyone has experience using NightWatch with TypeScript?,"<p>I am using NightWatch for my e2e testing and want to move towards ES6 way of writing tests.
I was able to do it with Babel and it worked fine but I want to use typescript.
I could not find much documentation of NightWatch with TypeScript. Found some github repositories:</p>

<ul>
<li><a href=""https://github.com/rkavalap/NightWatchTest"" rel=""noreferrer"">https://github.com/rkavalap/NightWatchTest</a></li>
<li><a href=""https://github.com/DonPage/Nightwatch-Typescript-example"" rel=""noreferrer"">https://github.com/DonPage/Nightwatch-Typescript-example</a></li>
<li><a href=""https://github.com/remojansen/TypeScriptTestingExamples"" rel=""noreferrer"">https://github.com/remojansen/TypeScriptTestingExamples</a></li>
</ul>

<p>But these do not contain any detailed documentation around typescript.</p>

<p>Any help would be appreciated!</p>
",https://stackoverflow.com/questions/41563829/anyone-has-experience-using-nightwatch-with-typescript,"['javascript', 'typescript', 'babeljs', 'nightwatch.js', 'e2e-testing']",4006,TRUE,5,3
custom function to select and click a random element in Nightwatch,"<p>I'm new to e2e testing (and JS). I use Nightwatch framework.</p>

<p>I'm trying to create a function that selects a random element from a list of elements with the same selector, and clicks on it.</p>

<p>This is what I tried:</p>

<pre><code>  pickOne(selector, target) {
    this.api.elements(selector, target, function(res) {
       optionsLength = Math.floor((Math.random() * res.value.length) + 1);
    });
    this.api.waitForElementVisible(`${target}:nth-child(${optionsLength})`);
    this.api.click(`${target}:nth-child(${optionsLength}) .action-button`);
  }
</code></pre>

<p>But in this case, <code>optionsLength is not defined</code>.</p>

<p><code>Math.floor((Math.random() * res.value.length) + 1)</code> returns a number. I want to use this number outside of the function. </p>

<p>I've tried to store the full function in a variable, as in:</p>

<pre><code>const optionsLength = this.api.elements(selector, element, function(res) {
       Math.floor((Math.random() * res.value.length) + 1);
    });
</code></pre>

<p>But that way <code>optionsLength</code> logs <code>[object Object]</code> instead a number.</p>
",https://stackoverflow.com/questions/45879532/custom-function-to-select-and-click-a-random-element-in-nightwatch,"['javascript', 'testing', 'automated-tests', 'nightwatch.js', 'e2e-testing']",1152,TRUE,3,3
toThrow to catch protractor error using pageobjects,"<p>I've started to work with protractor + Jasmine for E2E testing.</p>

<p>The idea is to do an invalid operation and catch the exception:</p>

<pre><code>expect(function () { return documentsPanel.clickUploadButtonError(); }).toThrow();
</code></pre>

<p>The documentsPanel is just a page object with multiple page actions. This is how I'm defining the method:</p>

<pre><code>this.clickUploadButtonError = function () {
    return uploadButton.click().thenCatch(function (err) {
        throw('Cannot click upload button.');
    });
};
</code></pre>

<p>The idea is for expect to pass by catching the error but my test still fails as uploadButton.click() throws a Selenium error:</p>

<blockquote>
  <p>Failed: unknown error: Element ... is not clickable at point (263, 131).</p>
</blockquote>

<p>Any ideas on how can Jasmine catch the Selenium error?</p>
",https://stackoverflow.com/questions/41893208/tothrow-to-catch-protractor-error-using-pageobjects,"['selenium', 'jasmine', 'protractor', 'automated-tests']",354,TRUE,2,1
Nightwatch.js - Getting title of element and compare it later,"<p>I'm using Nightwatch.js for E2E testing.</p>

<p>In the test, there should be a click on specific element in a table list to select an article. Then the article gets loaded.</p>

<p>Now I want to check if the correct article has been loaded by comparing the title.</p>

<p>How do I get the text of the selected element? In my code, the element is just clicked. In the second part, this title should be compared. In my code below, it is just hard coded:</p>

<pre><code>module.exports = {
  'article': function(browser) {
    browser
      .click('#list tbody tr:first-child .selectable')
      .waitForElementVisible('#article-wrapper', 10000)

    browser.expect.element('h1').text.to.equal('specific title')

    browser.end()
  }
}
</code></pre>
",https://stackoverflow.com/questions/44544875/nightwatch-js-getting-title-of-element-and-compare-it-later,"['javascript', 'testing', 'selenium-webdriver', 'nightwatch.js', 'e2e-testing']",2125,TRUE,1,1
Does unit testing in AngularJS involve interaction with the template?,"<p>I want to test a function that redirects to a different route. However, I'm wondering whether making the browser ""click"" through Karma, is putting the test out of the scope of the unit testing and making it more like e2e testing.</p>

<p>I saw in <a href=""https://angular.io/docs/ts/latest/guide/testing.html#!#routed-component"" rel=""nofollow noreferrer"">Angular2 relative documentation</a> that it calls a ""HeroClick"" function, but I don't get exactly what is this function and where it comes from.</p>

<p>If someone can shed some light to my confused mind, I would appreciate it.</p>
",https://stackoverflow.com/questions/41445641/does-unit-testing-in-angularjs-involve-interaction-with-the-template,"['unit-testing', 'angular', 'angular2-routing']",35,FALSE,0,1
Protractor does not close browser when a server is unavailable,"<p>I do e2e testing with protractor. When my application is running on a server the tests pass fine and a browser is closed afterward, however when the server is down the browser remains (Firefox, Chrome). It is OK on my local machine but I am experimenting with running tests on remote CI machine and afraid that the tests can spawn multiple browser windows if the server fails to run. How to make sure protractor closes the browser window in such situation?</p>

<p>Here is my configuration:</p>

<pre><code>exports.config = {
    allScriptsTimeout: 11000,
    specs: [
            '../test/e2e/*.js'
    ],
    capabilities: {
        'browserName': 'firefox'
    },
    baseUrl: 'http://localhost:8000/',
    framework: 'jasmine',
    jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
    }
};
</code></pre>

<p>and the test is:</p>

<pre><code>'use strict';

describe('typicaClient', function() {
    browser.get('index.html');

    it('test', function() {
        expect('str').toMatch('str');
    });
});
</code></pre>
",https://stackoverflow.com/questions/42067786/protractor-does-not-close-browser-when-a-server-is-unavailable,['protractor'],723,TRUE,1,1
Avoiding duplication of stories in e2e browser automation testing,"<p>I have two e2e tests that run with browser automation that test the following user stories:</p>

<p>C: <code>As a manager, I can add a member to my team.</code></p>

<p>D: <code>As a manager, I can pay a member of my team.</code></p>

<p>The thing is, in order to do <code>D</code> I have to first do <code>C</code>. So writing one e2e test that goes ABC and once that goes ABCD is redundant!</p>

<p>My question is: what are some best practices for avoiding redundancy in e2e testing? One thing I have thought about is just writing ABCD, and including an <code>assert</code> after the <code>C</code> step. Though that means that if we have a failure at <code>C</code>, we have no information if <code>D</code> would have worked or not.</p>
",https://stackoverflow.com/questions/46226483/avoiding-duplication-of-stories-in-e2e-browser-automation-testing,"['e2e-testing', 'browser-automation']",93,TRUE,0,1
Typescript cannot find module Protractor,"<p>I am integrating e2e testing in my project. The project uses Typescript (2.6.1).</p>

<p>I have just installed Protractor (5.2.0) but no matter what I do Typescript cannot import anything from the Protractor module.</p>

<p>My tsconfig looks like this:</p>

<pre><code>{
    ""compilerOptions"": {
        ""target"": ""es5"",
        ""module"": ""amd""
    },
    ""exclude"": [
        ""./spec"",
        ""./node_modules"",
        ""./bower_components""
    ]
}
</code></pre>

<p>My very simple try out test looks like this:</p>

<pre><code>import { browser } from ""protractor"";

describe(""test should run"", () =&gt; {
    it(""should navigate to the page"", () =&gt; {

    });
});
</code></pre>

<p>I get the following error: <code>TypeScript error: usermanagement/ts/controllers/RolesController.e2e.ts(1,25): error TS2307: Cannot find module 'protractor'.</code></p>

<p>Looking at the Protractor installation in my <code>node_modules</code> folder I do find a reference to a typings file and the actual typings themselves. However Typescript simply does not 'see' them. Interestingly Typescript has no problem finding typings in the <code>node_modules/@types</code> folder.</p>

<p>Anyone know what I am doing wrong?</p>
",https://stackoverflow.com/questions/47264856/typescript-cannot-find-module-protractor,"['typescript', 'protractor', 'e2e-testing']",12647,TRUE,2,1
How to extract text from &lt;Strong&gt; tag?,"<p>I am using Protractor with Jasmine for e2e testing my application. I have to validate whether the message thrown by the application is correct or not. The message box is visible only for 10 sec.
I tried using the ID but it didn't work.
Error Message: ""No element found using locator: By(css selector, *[id=""Message1""])""
Below is the HTML for the element:</p>

<pre><code>   &lt;div class=""alert alert-warning alert-dismissible ng-scope"" role=""alert"" ng-if=""message.error"" id=""Message""&gt;
&lt;strong id=""Message1"" class=""ng-binding""&gt;Please Enter Valid License Key&lt;/strong&gt;
</code></pre>

<p> 
The above element is in a modal dialog. Full HTML for Modal Dialog is mentioned below: </p>

<pre><code>     &lt;div class=""modal-content"" uib-modal-transclude=""""&gt;
    &lt;div class=""modal-header ng-scope""&gt;
        &lt;h4 class=""modal-title ng-binding"" id=""modal-title""&gt;Register New License Key&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div class=""modal-body ng-scope"" id=""modal-body""&gt;
        &lt;form name=""RegisterNewLicenseKeyForm"" ng-submit=""Register(objDs)"" novalidate="""" class=""ng-pristine ng-invalid ng-invalid-required""&gt;
            &lt;div class=""form-group""&gt;
                &lt;label for=""LicenseKey"" class=""ng-binding""&gt;License Key&lt;/label&gt;
                &lt;textarea class=""form-control ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required"" rows=""3"" id=""LicenseKey"" name=""LICENSE_KEY"" ng-model=""objDs.LICENSE_KEY"" placeholder=""License Key"" ng-required=""true"" my-maxlength=""500"" tab-index="""" ng-trim=""false"" required=""required"" style=""""&gt;&lt;/textarea&gt;
            &lt;/div&gt;
            &lt;!-- ngIf: !RegisterNewLicenseKeyForm.$valid --&gt;&lt;div ng-if=""!RegisterNewLicenseKeyForm.$valid"" class=""ng-scope""&gt;
                &lt;form-response-message&gt;&lt;!-- ngIf: message.error --&gt;&lt;div class=""alert alert-warning alert-dismissible ng-scope"" role=""alert"" ng-if=""message.error"" id=""Message""&gt;
    &lt;strong id=""Message1"" class=""ng-binding""&gt;Please Enter Valid License Key&lt;/strong&gt;
&lt;/div&gt;&lt;!-- end ngIf: message.error --&gt;
&lt;/form-response-message&gt;
            &lt;/div&gt;&lt;!-- end ngIf: !RegisterNewLicenseKeyForm.$valid --&gt;
            &lt;div class=""clearfix modal-footer1""&gt;
                &lt;div class=""pull-left""&gt;
                    &lt;button class=""btn btn-primary ng-binding"" id=""Validate"" type=""submit"" tabindex=""2"" ng-disabled=""RegisterNewLicenseKeyForm.$submitted || !RegisterNewLicenseKeyForm.$valid"" disabled=""disabled""&gt;Validate&lt;/button&gt;
                &lt;/div&gt;
                &lt;div class=""pull-right rightspace""&gt;
                   &lt;cancel-icon title=""Cancel"" type=""button"" name=""Cancel"" tabindex=""3"" ng-click=""Clear()"" class=""ng-isolate-scope""&gt;&lt;div ng-class=""{ &amp;quot;has-focus&amp;quot;: formName[name].hasFocus,
            &amp;quot;has-success&amp;quot;: formName[name].$valid,
            &amp;quot;has-error&amp;quot;: formName[name].$error.required &amp;amp;&amp;amp; formName.$submitted,
            &amp;quot;has-error-pattern&amp;quot;: formName[name].$error.pattern &amp;amp;&amp;amp; formName.$submitted,
            &amp;quot;is-empty&amp;quot;: !ngModel }"" class=""is-empty""&gt;
    &lt;button class=""btn btn-link btnPad t2  ng-pristine ng-untouched ng-empty ng-valid ng-valid-required"" id=""btnCancel"" type=""button"" title="""" ng-model=""ngModel"" ng-required="""" ng-readonly="""" autocomplete=""off"" spellcheck=""false"" tabindex=""""&gt;
        &lt;i class=""fa fa-ban fa-2x "" aria-hidden=""true""&gt;&lt;/i&gt;
    &lt;/button&gt;
&lt;/div&gt;

&lt;/cancel-icon&gt;
                   &lt;close-icon title=""Close"" type=""button"" name=""Close"" tabindex=""4"" ng-click=""Close()"" class=""ng-isolate-scope""&gt;&lt;div ng-class=""{ &amp;quot;has-focus&amp;quot;: formName[name].hasFocus,
            &amp;quot;has-success&amp;quot;: formName[name].$valid,
            &amp;quot;has-error&amp;quot;: formName[name].$error.required &amp;amp;&amp;amp; formName.$submitted,
            &amp;quot;has-error-pattern&amp;quot;: formName[name].$error.pattern &amp;amp;&amp;amp; formName.$submitted,
            &amp;quot;is-empty&amp;quot;: !ngModel }"" class=""is-empty""&gt;
    &lt;button class=""btn btn-link btnPad t2 ng-pristine ng-untouched ng-empty ng-valid ng-valid-required"" id=""btnClose"" type=""button"" title="""" ng-model=""ngModel"" ng-required="""" ng-readonly="""" autocomplete=""off"" spellcheck=""false"" tabindex=""""&gt;
        &lt;i class=""fa fa-times-circle fa-2x"" aria-hidden=""true""&gt;&lt;/i&gt;
    &lt;/button&gt;
&lt;/div&gt;

&lt;/close-icon&gt;&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=""clearfix""&gt;&lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Below is the Protractor code that i tried.</p>

<pre><code>describe('Click on login button', function() {

      it('should navigate to Home page', function()  {

        browser.get(URL);
        browser.sleep(1000);
        browser.manage().window().maximize();

    //Register New License Key      
        element(by.id('RegisterNewLicenseKey')).click();
        browser.sleep(1000);
        element(by.id('LicenseKey')).sendKeys('LISC010102'); 
        browser.sleep(1000);
        element(by.id('Validate')).click(); 
        browser.sleep(1000);
        var message=$('#Message1').getText();
        expect(message).toBe('Please Enter Valid License Key');
        element(by.id('Close')).click(); 
    //User Login  
        element(by.id('text_User_name')).sendKeys('admin');
        element(by.id('text_userPassword')).sendKeys('welcome');
        browser.sleep(1000);
        element(by.id('btnLogin')).click();
        var title = browser.getTitle();
        browser.sleep(1000);
        expect(title).toBe('Home');

     });

    });
</code></pre>

<p>Please suggest how to capture the text from 'Strong' Tag?
Thanks in Advance.</p>
",https://stackoverflow.com/questions/41972449/how-to-extract-text-from-strong-tag,"['javascript', 'jquery', 'html', 'css', 'protractor']",2060,TRUE,1,3
"Docker/CI: Get access to nodeJS app, which is created in another stage","<p>In my CI pipeline (gitlab) there is a <strong>build</strong> and an <strong>end2end-testing</strong> stage. In the build stage the files of the application will be created. Then I want to copy the generated files to the e2e_testing container to do some tests with this application.</p>

<p>How do I copy the generated files (/opt/project/build/core/bundle) to the image?</p>

<p>For e2e testing I want to use nightwatchJS - see the e2e docker image below. Maybe it is possible to use the build image within the e2e image?</p>

<p>What I need to do is nightwatchJS e2e testing for the generated nodeJS application</p>

<hr>

<p><strong>My attempt</strong></p>

<p>Copy the generate files to <code>e2e_testing</code> container with <code>docker cp</code> command.</p>

<pre><code>build:
  stage: build
  before_script:
    - meteor build /opt/project/build/core --directory
  script:
    - cd /opt/jaqua/build/core/bundle
    - docker build -t $CI_REGISTRY_IMAGE:latest .
  after_script:
    - docker cp /opt/project/build/core/bundle e2e_testing:/opt/project/build/core/
</code></pre>

<p>But this is not working, as the next stage (e2e) will create a container from the <code>e2e:latest</code> image. So in this container there is no bundle folder existing, so this sample script is failing.</p>

<pre><code>e2e:
  image: e2e:latest
  stage: e2e
  before_script:
    - cd /opt/project/build/core/bundle &amp;&amp; ls -la
  script:
    # - run nightwatchJS to do some e2e testing with the build bundle
</code></pre>

<p><strong>e2e:latest image Dockerfile</strong></p>

<pre><code>FROM java:8-jre

## Node.js setup
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get install -y nodejs

## Nightwatch
RUN npm install -g nightwatch
</code></pre>

<p>A container called <code>e2e_testing</code> is created from this image and it is running all the time. So at the time the CI pipeline is running, the container is already existing.</p>

<p>But at the time, this image is created the application files are not existing, as they are generated at the build stage. So I cannot put those files in the docker image using a Dockerfile.</p>

<p><strong>So how can I get access to the files generated in the build stage in the e2e stage?</strong></p>

<p>Or is it possible to use the build image ($CI_REGISTRY_IMAGE:latest) within the nightwatch image (e2e)</p>
",https://stackoverflow.com/questions/43621022/docker-ci-get-access-to-nodejs-app-which-is-created-in-another-stage,"['node.js', 'docker', 'gitlab-ci']",96,TRUE,1,1
How to convert &quot;promises&quot; to &quot;string&quot; in static methods [ts],"<p>I have a doubt about using of ""promises"" in typescript. I'm writting e2e testing framework with protractor and typescript and I would like to make some query to the database in order to use the data retrieved to fill forms or make validations.</p>

<p>I've create a new class ""UserService"" and the idea is to use some static methods to return data. I've installed the typeOrm library to handle it. </p>

<p>The problem is I cannot find the way to convert the ""promise"" returns to ""strings"". How can I do it?</p>

<p>Take a look to the code:</p>

<pre><code>import ""reflect-metadata"";
import { User } from ""././entities/user"";
import { ConnectionOptions, Connection, Driver, createConnection } from ""typeorm"";

const connectionOptions: ConnectionOptions = {
    driver: {
        type: ""mysql"",
        host: ""localhost"",
        port: 3306,
        username: ""root"",
        password: ""admin123"",
        database: ""user""
    },
    entities: [User],
    autoSchemaSync: false
};

export class UserService {

    static getUserName(userId:number): string {

        let us = createConnection(connectionOptions).then(connection =&gt; { 
            return connection.getRepository(User).findOne({Id: userId})
        }).then(user =&gt; user.name);

        return us;  //it return an Promise&lt;string&gt;.
    }
}
</code></pre>

<p>Into the ""step"" classes, the above class will be used for example as:</p>

<pre><code>let name: string = UserService.getUserName(1);
txtUsername.Sendkeys(name);
</code></pre>
",https://stackoverflow.com/questions/43565033/how-to-convert-promises-to-string-in-static-methods-ts,"['parsing', 'typescript', 'promise', 'protractor']",5691,TRUE,2,1
Protractor: HTTP Response Testing,"<p>I'm using <a href=""https://github.com/angular/protractor/"" rel=""nofollow noreferrer"">Protracotr</a> for e2e testing.</p>

<p>I want to test response from HTTP in protractor.
Basically:</p>

<ol>
<li>I have running some NodeJS server.</li>
<li>I want to send request to this server</li>
<li>Receive some JSON data</li>
<li>Parse those data</li>
<li>Check if they are correct</li>
</ol>

<p>I'm using ""http"" NODEJS Lib to make http calls GET+POST.</p>

<pre><code>var http = require('http');

describe(""Some test"", function() {

    function httpGet(siteUrl) {
        http.get(siteUrl, function(response) {

            response.setEncoding('utf8');
            response.on(""data"", function(chunk) {
                bodyString += chunk;
            });

            response.on('end', function() {
                defer.fulfill({
                    bodyString: bodyString
                });
            });

        }).on('error', function(e) {
            defer.reject(""Got http.get error: "" + e.message);
        });

        return defer.promise;
    }

    it('Test case', function(){
        httpGet(""http://localhost:3333/path/1/10"").then(function(result) {
            var json_data = JSON.parse(result.bodyString);

            for (var i = 0; i &lt; json_data.length; ++i) {
                console.log(""label: "" + json_data[i].label);
                expect(json_data[i].label).toEqual('abc');
            }
        });
    });
});
</code></pre>

<p>I can see response message nice parsed in console.log, but I'm not able to test anything, my <strong>test results are</strong>:</p>

<pre><code>Finished in 0.019 seconds
1 test, 0 assertions, 0 failures

label: Text1
label: Text2

[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed

Process finished with exit code 0
</code></pre>

<p><strong>The console log is write down after finish of test and no assertion has been done.</strong></p>

<p>Any help please, how to test those responses (in JSON format) from server in Protractor? </p>
",https://stackoverflow.com/questions/41467777/protractor-http-response-testing,"['json', 'node.js', 'protractor', 'httprequest', 'httpresponse']",3440,TRUE,3,1
protractor: filter until finding first valid element,"<p>I am doing e2e testing on a site that contains a table which I need to iterate ""until"" finding one that doesn't fail when I click on it.</p>

<p>I tried it using <code>filter</code> and it is working:</p>

<pre><code>this.selectValidRow = function () {
    return Rows.filter(function (row, idx) {
        row.click();
        showRowPage.click();
        return errorMessage.isDisplayed().then(function (displayed) {
            if (!displayed) {
                rowsPage.click(); // go back to rows Page, all the rows
                return true;
            }
        });
    }).first().click();
}; 
</code></pre>

<p>The problem here is that it is iterating <strong>all</strong> available rows, and I only need the first one that is valid (that doesn't show an <code>errorMessage</code>).</p>

<p>The problem with my current approach is that it is taking too long, as my current table could contain hundreds of rows.</p>

<p>Is it possible to <code>filter</code> (or a different method) and stop iterating when first valid occurrence appears?, or could someone come up with a better approach?</p>
",https://stackoverflow.com/questions/43030508/protractor-filter-until-finding-first-valid-element,"['node.js', 'protractor']",142,TRUE,1,2
How do I access elements of child component from parent for testing Angular 2?,"<p>I'm trying to get an element of child component from a parent component for testing in Karma-Jasmine. 
I have a component(parent) with contact form which in-turn has a username and password component(child) which is used for validating the form and displaying error messages. Now I need to test the alert messages of child component from the parent component. I tried following</p>

<pre><code>   let parent = fixture.debugElement.query(By.css('input-component'));
   let child = parent.query(By.css('alert'));
</code></pre>

<p>But I did not manage to get any result. it just returns the parent HTML. I found a solution for E2E testing <a href=""https://angular.io/guide/component-interaction#test-it-4"" rel=""nofollow noreferrer"">here</a> but it doesn't work with Unit testing.</p>

<p>How can I accomplish the task. Here's the <a href=""https://plnkr.co/edit/p0S1ukTW1V3U1AK0hE92?p=preview"" rel=""nofollow noreferrer"">Plunker</a> for explaining my scenario.</p>
",https://stackoverflow.com/questions/46036766/how-do-i-access-elements-of-child-component-from-parent-for-testing-angular-2,"['html', 'angular', 'unit-testing', 'karma-jasmine']",2165,TRUE,0,1
Detox tests are not finishing,"<p>I've set up <a href=""https://github.com/wix/detox"" rel=""nofollow noreferrer"">detox</a> for E2E testing and Bitrise for continuous integration.</p>

<p>I have set up a very simple initial test suite but for some reason, my tests do not <em>finish</em> after they have completed.</p>

<p><strong>init.js</strong></p>

<pre><code>require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;

before(async () =&gt; {
  await detox.init(config);
});

after(async () =&gt; {
  await detox.cleanup();
});
</code></pre>

<p><strong>firstTest.spec.js</strong></p>

<pre><code>describe('Example', () =&gt; {
  beforeEach(async () =&gt; {
    await device.reloadReactNative();
  });

  it('should have welcome screen', async () =&gt; {
    await expect(element(by.id('UniqueID'))).toBeVisible();
  });
})
</code></pre>

<p><strong>Workflow Segment:</strong>
(This is just a <em>Script step</em>)</p>

<pre><code>brew update

node -v

brew tap wix/brew

brew install wix/brew/applesimutils

npm install -g detox-cli

detox build --configuration ios.sim.release
</code></pre>

<p>(This will be ported over to a .yml file later)</p>

<p><strong>package.json</strong> - With all unnecessary stuff omitted. </p>

<pre><code>""detox"": {
        ""configurations"": {
            ""ios.sim.debug"": {
                ""binaryPath"": ""ios/build/Build/Products/Debug-iphonesimulator/AlarmApp.app"",
                ""build"": ""xcodebuild -project ios/AlarmApp.xcodeproj -scheme AlarmApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"",
                ""type"": ""ios.simulator"",
                ""name"": ""iPhone 8""
            },
            ""ios.sim.release"": {
                ""binaryPath"": ""ios/build/Build/Products/Release-iphonesimulator/AlarmApp.app"",
                ""build"": ""xcodebuild -project ios/AlarmApp.xcodeproj -scheme AlarmApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build"",
                ""type"": ""ios.simulator"",
                ""name"": ""iPhone 8""
            }
        }
    }
</code></pre>

<p>Bitrise successfully executes my tests and I can run them on my local machine so the problem therefore lies within Detox. </p>

<p>The test will pass, but it just hangs.</p>

<p>The <code>detox.cleanup()</code> function gets called as I am able to see it in the log file:</p>

<pre><code>2017-11-07 16:23:02.802 AlarmApp[15771:1271275] Crash handler setup started.
2017-11-07 16:23:02.805 AlarmApp[15771:1271275] Crash handler setup completed.
2017-11-07 16:23:02.805 AlarmApp[15771:1271275] Enabling accessibility for automation on Simulator.
2017-11-07 16:23:04.427 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: login
2017-11-07 16:23:04.714 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-11-07 16:23:04.795 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: &lt;OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue&gt;
2017-11-07 16:23:04.821 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: &lt;OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue&gt;
2017-11-07 16:23:05.276 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: ready
2017-11-07 16:23:05.287 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: reactNativeReload
2017-11-07 16:23:05.293 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: &lt;OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue&gt;
2017-11-07 16:23:05.293 AlarmApp[15771:1271275] ☣️ Adding idling resource for queue: &lt;OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue&gt;
2017-11-07 16:23:05.402 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: ready
2017-11-07 16:23:05.409 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: invoke
2017-11-07 16:23:05.836 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: invokeResult
2017-11-07 16:23:05.844 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Received: cleanup
2017-11-07 16:23:05.845 AlarmApp[15771:1271275] ☣️ DETOX:: Detox Action Sent: cleanupDone
</code></pre>

<p>Any help would be largely appreciated.</p>
",https://stackoverflow.com/questions/47162804/detox-tests-are-not-finishing,"['react-native', 'bitrise', 'detox']",1234,TRUE,0,1
protractor -errors Message:Expected 0 to equal 5,"<p>protractor show me error message
that there are no list item. </p>

<blockquote>
  <p>conFusion App E2E Testing menu 0 item should show the number of comments 
        Message:
       Expected 0 to equal 5.
        Stack:
        Error: Failed expectation
          at Object. (/Users/fullStock/anglerJs/conFusion/test/e2e/scenarios.js:37:23)</p>
</blockquote>

<p>I did e2e test to ensure the number of comment list that will appear on page is 5.I used json server to serve up the data. I think the problem is element have not  appeared in the DOM yet.Is there any way to tell protractor to wait until an element finally appears in the DOM?</p>

<p>code e2e test</p>

<pre><code>   describe('menu 0 item', function() {
beforeEach(function() {
  browser.get('index.html#/menu/0');
});

it('should have a name', function() {
      var name = element(by.binding('dish.name'));
      expect(name.getText()).
         toEqual('Uthapizza Hot $4.99');
});

it('should show the number of comments as', function() {
     expect(element.all(by.repeater('comment in dish.comments'))
        .count()).toEqual(5);

});
</code></pre>

<p>code html for comment</p>

<pre><code>    &lt;h4&gt; Customer Comments &amp;nbsp; 
                &lt;span style=""font-size:15px;""&gt;sorted by:&lt;input type=""text"" ng-model=""FiltText""&gt;&lt;/span&gt;&lt;/h4&gt;
            &lt;blockquote ng-repeat=""commet in dish.comments |orderBy:FiltText""&gt;
              &lt;h5&gt;{{commet.rating}} Stars&lt;/h5&gt;
                &lt;h5&gt;{{commet.comment}}&lt;/h5&gt;
                &lt;footer&gt;{{commet.author}}, &lt;span&gt;{{commet.date|date}}.&lt;/span&gt;&lt;/footer&gt;

            &lt;/blockquote&gt;
</code></pre>

<p>protractor configuration</p>

<pre><code>exports.config = {
    allScriptsTimeout: 11000,
     specs: [
    'e2e/*.js'
      ], 
   capabilities: {
    browserName: 'chrome'
  },

 baseUrl: 'http://localhost:3001/',

  framework: 'jasmine',
   directConnect: true,

 jasmineNodeOpts: {
   defaultTimeoutInterval:30000
 }
};
</code></pre>
",https://stackoverflow.com/questions/43246060/protractor-errors-messageexpected-0-to-equal-5,"['angularjs', 'jasmine', 'protractor']",1217,FALSE,0,1
apple-itunes-app meta tag testing,"<p>I am adding apple-itunes-app meta tag in my web site for up-selling to my iOS app. When the app is not installed, i see ""View this app"" in the web site banner which is good.</p>

<p>My question is about how to test the deep-linking? When I install a dev build on my device, I am still seeing ""View this app"" instead of Open this app. I would like to check if all the properties are passed in correctly and deep-linking is working before I send my app to production.</p>

<p>One strategy that I can think of is just sending deep link into the app via app protocol scheme but that is not proper E2E testing.</p>

<p>Are there any other ways to test apple-itunes-app meta tag?</p>
",https://stackoverflow.com/questions/41966129/apple-itunes-app-meta-tag-testing,"['ios', 'iphone', 'meta-tags']",1658,TRUE,11,1
Angular E2E - Error with Selenium/Protractor Config,"<p>I'm trying to use protractor for some e2e testing and have never used it before. The project has been generated using yeoman-gulp-angular and there are some predefined testing tasks/configs. When I try to execute the tasks I see that selenium has started and then the stacktrace outputs a few errors before selenium shuts down. Is there something missing in the configuration?</p>

<p><strong><em>Protractor config</em></strong></p>

<pre><code>'use strict';

var paths = require('./.yo-rc.json')['generator-gulp-angular'].props.paths;

// An example configuration file.
exports.config = {
  // The address of a running selenium server.
  //seleniumAddress: 'http://localhost:4444/wd/hub',
  //seleniumServerJar: deprecated, this should be set on node_modules/protractor/config.json

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'chrome'
  },

  // Spec patterns are relative to the current working directly when
  // protractor is called.
  specs: [paths.e2e + '/**/*.js'],

  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
  }
};
</code></pre>

<p><strong><em>Stacktrace</em></strong></p>

<pre><code>Starting selenium standalone server...
(node:23800) DeprecationWarning: util.puts is deprecated. Use console.log instead.
Selenium standalone server started at http://[IP]/wd/hub

   Stacktrace:
     UnknownError: unknown error: Runtime.executionContextCreated has invalid 'context': {""auxData"":{""frameId"":""23817.1"",""isDefault"":true},""id"":1,""name"":"""",""origin"":""://""}
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.12.301326 (093c7e07b4a916b690e784b0374c7f618f1ea4be),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
...
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
...
Finished in 4.84 seconds
2 tests, 4 assertions, 4 failures

Shutting down selenium standalone server.
</code></pre>

<p><strong><em>Edit</em></strong></p>

<pre><code>[launcher] Error: UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
xpi"",""e"":true,""v"":""1.7"",""st"":1486662567000},""firefox@getpocket.com"":{""d"":""/Applications/Firefox.app/Contents/Resources/browser/features/firefox@getpocket.com.xpi"",""e"":true,""v"":""1.0.5"",""st"":1486662567000},""webcompat@mozilla.org"":{""d"":""/Applications/Firefox.app/Contents/Resources/browser/features/webcompat@mozilla.org.xpi"",""e"":true,""v"":""1.0"",""st"":1486662567000}},""app-global"":{""{972ce4c6-7e08-4474-a285-3208198ce6fd}"":{""d"":""/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi"",""e"":true,""v"":""51.0.1"",""st"":1486662567000}}}
</code></pre>

<p><strong><em>Update</em></strong></p>

<p>I thought thing were fixed but they are not. After running <code>webdriver-manager update</code> and then <code>webdriver-manager status</code> I see <code>chromedriver version available: 2.27 [last]</code>. When I look in node_modules/protractor/selenium I see <code>chromedriver_2.12.zip</code>. Inside node_modules/protractor/config.json I changed the webdriverVersions for chromedriver from 2.12 to 2.27 which is unavailable. Not sure which version I should specify in protractor /config.json.</p>

<pre><code>test-mbp:fota-admin-portal test$ gulp protractor:src
[11:48:17] Starting 'webdriver-update'...
selenium standalone is up to date.
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.27/chromedriver_mac32.zip...
Error: Got code 404 from https://chromedriver.storage.googleapis.com/2.27/chromedriver_mac32.zip
chromedriver_2.27.zip downloaded to /Users/test/project/node_modules/protractor/selenium/chromedriver_2.27.zip

/Users/test/project/node_modules/adm-zip/adm-zip.js:19
           throw Utils.Errors.INVALID_FILENAME;
           ^
Invalid filename
</code></pre>

<p><strong><em>Stacktrace</em></strong></p>

<pre><code>   Stacktrace:
     UnknownError: unknown error: Runtime.executionContextCreated has invalid 'context': {""auxData"":{""frameId"":""26574.1"",""isDefault"":true},""id"":1,""name"":"""",""origin"":""://""}
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.12.301326 (093c7e07b4a916b690e784b0374c7f618f1ea4be),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
</code></pre>
",https://stackoverflow.com/questions/42126431/angular-e2e-error-with-selenium-protractor-config,"['angularjs', 'selenium', 'protractor']",781,TRUE,3,2
Travis Build fails after 49 min even when logging output for all jobs every 1-2 min,"<p>I have a build for an Ionic project and its E2E testing with SauceLabs. The build is timing out after 49 min 17 sec(50 min). All of my jobs are running well and logging output frequently at least every 1-2 min. The timeout is happening consistently at 50 min.</p>

<p>My build goes meets all the requirements as mentioned <a href=""https://docs.travis-ci.com/user/customizing-the-build#Build-Timeouts"" rel=""nofollow noreferrer"">here</a> to not suffer a time out. Also, there is no timeout for the build as mentioned in the docs. So the build shouldn't timeout as it is happening in the case. Any resolutions for this Issue?</p>

<p>Here are some of the logs: </p>

<ul>
<li><a href=""https://travis-ci.org/magician03/moodlemobile2/builds/241500777"" rel=""nofollow noreferrer"">https://travis-ci.org/magician03/moodlemobile2/builds/241500777</a></li>
<li><a href=""https://travis-ci.org/magician03/moodlemobile2/builds/241414546"" rel=""nofollow noreferrer"">https://travis-ci.org/magician03/moodlemobile2/builds/241414546</a></li>
<li><a href=""https://travis-ci.org/magician03/moodlemobile2/builds/241401570"" rel=""nofollow noreferrer"">https://travis-ci.org/magician03/moodlemobile2/builds/241401570</a></li>
</ul>
",https://stackoverflow.com/questions/44473770/travis-build-fails-after-49-min-even-when-logging-output-for-all-jobs-every-1-2,"['ionic-framework', 'travis-ci', 'angularjs-e2e', 'saucelabs']",561,TRUE,2,1
how to check what is causing webdriver-manager to fail,"<p>I am trying to execute this simple protractor example <a href=""https://coryrylan.com/blog/introduction-to-e2e-testing-with-the-angular-cli-and-protractor"" rel=""nofollow noreferrer"">https://coryrylan.com/blog/introduction-to-e2e-testing-with-the-angular-cli-and-protractor</a> and I am getting </p>

<pre><code>webpack: Compiled successfully.
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 123.123.123.123:443
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
</code></pre>

<p>As far as I could understand, this is an error caused by failing while updating the webdrive-manager. I tried update manually by myself but I am still getting the same error.</p>

<pre><code>PS C:\_pocs\ws_vsc\ng-pokedex-master&gt; npm install -g webdriver-manager
C:\Users\dca\AppData\Roaming\npm\webdriver-manager -&gt; C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\bin\webdriver-manager
+ webdriver-manager@12.0.6
added 93 packages in 7.637s
PS C:\_pocs\ws_vsc\ng-pokedex-master&gt; ng e2e
** NG Live Development Server is listening on localhost:49152, open your browser on http://localhost:49152/ **
Date: 2017-12-27T15:18:27.307Z
Hash: 7b44c1a34c892e7982d9
Time: 11649ms
chunk {about.module} about.module.chunk.js, about.module.chunk.js.map () 5.36 kB  [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 41.1 kB [initial] [rendered]
chunk {pokemon.module} pokemon.module.chunk.js, pokemon.module.chunk.js.map () 19.3 kB  [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 199 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 66.4 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.33 MB [initial] [rendered]
(node:14144) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

webpack: Compiled successfully.
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 123.123.123.123:443
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
</code></pre>

<p>and, other tentative</p>

<pre><code>PS C:\_pocs\ws_vsc\ng-pokedex-master&gt; webdriver-manager start
webdriver-manager: using global installed version 12.0.6
[16:20:31] W/start - the out_dir path C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\selenium does not exist, run webdriver-manager update
PS C:\_pocs\ws_vsc\ng-pokedex-master&gt; webdriver-manager update
webdriver-manager: using global installed version 12.0.6
[16:20:52] I/file_manager - creating folder C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\selenium
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 123.123.123.123:443
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
</code></pre>

<p>I don't think it will be relevant but just in case here is the package.json from above project. I tried both ""protractor"": ""~5.1.1"" and 5.1.2</p>

<pre><code>{
  ""name"": ""ng-pokedex"",
  ""version"": ""0.0.0"",
  ""license"": ""MIT"",
  ""scripts"": {
    ""ng"": ""ng"",
    ""start"": ""ng serve"",
    ""lint"": ""sass-lint &amp;&amp; ng lint"",
    ""test"": ""ng test"",
    ""pree2e"": ""webdriver-manager update --standalone false --gecko false"",
    ""e2e"": ""protractor"",
    ""build"": ""ng build"",
    ""build:prod"": ""npm run lint &amp;&amp; ng build --prod --stats-json"",
    ""deploy"": ""npm run build:prod &amp;&amp; firebase deploy"",
    ""bundle-report"": ""webpack-bundle-analyzer dist/stats.json""
  },
  ""private"": true,
  ""dependencies"": {
    ""@angular/animations"": ""^5.1.2"",
    ""@angular/common"": ""^5.1.2"",
    ""@angular/compiler"": ""^5.1.2"",
    ""@angular/core"": ""^5.1.2"",
    ""@angular/forms"": ""^5.1.2"",
    ""@angular/http"": ""^5.1.2"",
    ""@angular/platform-browser"": ""^5.1.2"",
    ""@angular/platform-browser-dynamic"": ""^5.1.2"",
    ""@angular/router"": ""^5.1.2"",
    ""@angular/service-worker"": ""^5.1.2"",
    ""blueprint-css"": ""2.4.2"",
    ""core-js"": ""^2.5.3"",
    ""rxjs"": ""^5.5.6"",
    ""zone.js"": ""^0.8.14""
  },
  ""devDependencies"": {
    ""@angular/cli"": ""1.6.1"",
    ""@angular/compiler-cli"": ""^5.1.2"",
    ""@angular/language-service"": ""^5.1.2"",
    ""@types/jasmine"": ""~2.5.53"",
    ""@types/jasminewd2"": ""~2.0.2"",
    ""@types/node"": ""^6.0.95"",
    ""codelyzer"": ""^4.0.2"",
    ""jasmine-core"": ""~2.6.2"",
    ""jasmine-spec-reporter"": ""~4.1.0"",
    ""karma"": ""~1.7.0"",
    ""karma-chrome-launcher"": ""~2.1.1"",
    ""karma-cli"": ""~1.0.1"",
    ""karma-coverage-istanbul-reporter"": ""^1.3.3"",
    ""karma-jasmine"": ""^1.1.1"",
    ""karma-jasmine-html-reporter"": ""^0.2.2"",
    ""protractor"": ""~5.1.1"",
    ""sass-lint"": ""1.12.1"",
    ""ts-node"": ""~3.2.0"",
    ""tslint"": ""~5.7.0"",
    ""typescript"": ""~2.4.2"",
    ""webpack-bundle-analyzer"": ""2.9.0""
  }
}
</code></pre>

<p>Other thing just came to my mind would be that I had wrong proxy configuration but I can successfully run npm install so I don't think this will explain my issue. BTW, here is</p>

<pre><code>H:\&gt;npm config list
; cli configs
metrics-registry = ""https://registry.npmjs.org/""
scope = """"
user-agent = ""npm/5.5.1 node/v8.8.1 win32 x64""

; userconfig C:\Users\dca\.npmrc
http-proxy = ""http://XXX.vm.mycompany.net:3128/""
https-proxy = ""http://XXX.vm.mycompany.net:3128/""
proxy = ""http://XXX.vm.mycompany.net:3128/""

; builtin config undefined
prefix = ""C:\\Users\\dca\\AppData\\Roaming\\npm""

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = H:\
; HOME = C:\Users\dca
; ""npm config ls -l"" to show all defaults.
</code></pre>
",https://stackoverflow.com/questions/47994739/how-to-check-what-is-causing-webdriver-manager-to-fail,"['angular', 'protractor', 'chrome-web-driver', 'webdriver-manager']",2285,TRUE,1,1
Node Testing: how to run bash commands after mocha test cases,"<p>I'm using <code>Mocha</code> and <code>Selenium</code> to do an e2e test for my node web app. Now the problem is, I want to tear down databases after the execution of all test cases.</p>

<p>Backend uses two databases - mongo and postgres. I created new empty testing databases of each, just for the e2e testing. During the testing some records are inserted into databases. So, at the end of testing (when mocha test cases which invoke selenium are all executed), I want to tear down the test databases and create new ones. These operations are apparently done by bash commands.</p>

<p>So, is this a good practice and if so, how can I achieve this, like writing bash commands in js file(which execute the mocha test cases)?</p>
",https://stackoverflow.com/questions/45179894/node-testing-how-to-run-bash-commands-after-mocha-test-cases,"['node.js', 'selenium', 'testing', 'mocha.js']",1205,TRUE,0,1
"NodeJS, Protractor and Chrome DevTools Error","<p>I am trying to get Protractor E2E testing to run on my local Windows workstation at work but I keep getting this error.  </p>

<blockquote>
  <p>webpack: Compiled successfully. [07:50:41] I/file_manager - creating
  folder
  c:\repos\polo-buyer-ui\node_modules\protractor\node_modules\webdriver-manager\selenium
  [07:50:42] I/update - chromedriver: unzipping chromedriver_2.32.zip
  [07:50:44] I/launcher - Running 1 instances of WebDriver [07:50:44]
  I/direct - Using ChromeDriver directly...
  [0925/075047.256:ERROR:devtools_http_handler.cc(786)] DevTools
  listening on 127.0.0.1:12985</p>
</blockquote>

<p>I am able to get it to work with no issues on a linux workstation and my personal (non-work) PC runnning Windows 10.  I find very little information on this error message </p>

<blockquote>
  <p>[0925/075047.256:ERROR:devtools_http_handler.cc(786)] DevTools</p>
</blockquote>

<p>But I get this no matter what I do and I can't figure out why?</p>
",https://stackoverflow.com/questions/46408375/nodejs-protractor-and-chrome-devtools-error,"['node.js', 'protractor', 'google-chrome-devtools']",532,FALSE,0,2
E2E tests with multiple pages with information from browser,"<p>I am writing an E2E test with protractor. I had to fetch information from the browser and execute a step multiple times.</p>

<p>I am testing one screen which will start when a </p>

<ul>
<li>User clicks 'Start'</li>
<li>lands on a new page</li>
<li>The workflow below is invoked with count being passed as argument</li>
<li><code>id</code> the html id does not change. the value changes when queried again after submitting the current form. </li>
</ul>



<pre><code>for(i = 0 ; i &lt; count ; i++){
   console.log(""counter is ""+i);
   element(by('id')).evaluate('value').then(function(v) {
    // do some action on UI based on v
    element(by('id1')).sendKeys(v+v);
    // submit etc., 
    // some angular code runs in the frontend.
   }
   // need to wait since webdriver jumps to the next one without this completing
}
</code></pre>

<p>Many blog posts/documentations suggests you cannot use it in a loop, but does not suggest any alternative way to do this. </p>

<p>Any suggestions appreciated. </p>

<blockquote>
  <p>Never use protractor element statements inside loop: The simple reason is that the webdriverJS (protractor) API is asynchronous. Element statements returns a promise and that promise is in unresolved state while the code below the statements continues to execute. This leads to unpredictable results. Hence, it is advisable to use recursive functions instead of loops.</p>
</blockquote>

<p>source: <a href=""http://engineering.wingify.com/posts/angularapp-e2e-testing-with-protractor/"" rel=""noreferrer"">http://engineering.wingify.com/posts/angularapp-e2e-testing-with-protractor/</a></p>

<p>Edit: updated question with details of workflow.</p>
",https://stackoverflow.com/questions/42081673/e2e-tests-with-multiple-pages-with-information-from-browser,"['angularjs', 'selenium', 'protractor']",1174,TRUE,11,3
Cucumber+Gherkin: Parse natural language to boolean,"<p>So, we just introduced Cucumber + Gherkin to explore e2e testing in our fairly fresh Angular2 project. We decided to write the step definitions in JS. I am trying to be fairly generic in the steps definitions.
This is what I am trying to achieve:</p>

<p>We have</p>

<p><code>this.Then(/^I should see (.*) on the page$/, function(componentName, callback) {
    expect(element(by.id(componentName)).isPresent()).to.eventually.be.true;
    setTimeout(callback, 1000);
  });</code></p>

<p>I would like to also allow definitions in the form of:</p>

<p><code>Then I should not see Results on the page</code></p>

<p>To denote that certain elements are not supposed to be displayed. Any elegant way of doing that or even built in-tools I could use? The documentation and googling only gave me things that included <code>true/false</code> in the description. I have a feeling that c'n'p will make our step definitions grow super quickly and make maintenance unnecessarily hard unless we figure out this kind of thing up front.
Stop me if you think this is a stupid idea and if so please tell me why.</p>
",https://stackoverflow.com/questions/42854665/cucumbergherkin-parse-natural-language-to-boolean,"['cucumber', 'gherkin', 'cucumberjs']",2796,TRUE,0,1
Uable to access to localhost:8080 after upgrading NodeJS to 8.1.4,"<p>Our development group is starting a new React project and I have been trying to use Nightwatch + Selenium to do the e2e testing. I got it to work when running everything using <strong>NodeJS 6.9.4</strong>. Now we have been forced to upgrade NodeJS to 8.1.4 and I'm facing an issue that is stopping me to proceed with testing. When using Selenium with Chrome as browser, I keep getting a 'This site can't be reached' message (but the page can be accessed if I open manually a Chrome window. Any idea what can be going on? Here you have the test result log and my nightwatch.conf.js </p>

<p><strong><em>Test Result:</em></strong> </p>

<pre><code>INFO Request: GET /wd/hub/session/fc36e7a7-4909-4dfd-a853-6d769accb085/element/0/text 
  - data: 
  - headers:  {""Accept"":""application/json""}
INFO Response 200 GET /wd/hub/session/fc36e7a7-4909-4dfd-a853-6d769accb085/element/0/text (16ms) { state: 'success',
  sessionId: 'fc36e7a7-4909-4dfd-a853-6d769accb085',
  hCode: 972983271,
  value: 'This site can’t be reached',
  class: 'org.openqa.selenium.remote.Response',
  status: 0 }
</code></pre>

<p><strong><em>Nightwatch Conf</em></strong></p>

<pre><code>const SCREENSHOT_PATH = ""./screenshots/"";
const BIN_PATH = './node_modules/nightwatch/bin/';
``
// we use a nightwatch.conf.js file so we can include comments and helper functions
module.exports = {
    ""src_folders"": [
        ""__tests__/e2e/specs""// Where you are storing your Nightwatch e2e tests
    ],
    ""output_folder"": ""./reports"", // reports (test outcome) output by nightwatch
    ""selenium"": { // downloaded by selenium-download module (see readme)
        ""start_process"": false, // tells nightwatch to start/stop the selenium process
        ""server_path"": ""./node_modules/nightwatch/bin/selenium.jar"",
        ""host"": ""127.0.0.1"",
        ""port"": 4444, // standard selenium port
        ""cli_args"": { // chromedriver is downloaded by selenium-download (see readme)
            ""webdriver.chrome.driver"" : ""./node_modules/nightwatch/bin/chromedriver""
        }
    },
    ""test_settings"": {
        ""default"": {
            ""screenshots"": {
                ""enabled"": true, // if you want to keep screenshots
                ""path"": './screenshots' // save screenshots here
            },
            ""globals"": {
                ""waitForConditionTimeout"": 5000 // sometimes internet is slow so wait.
            },
            ""desiredCapabilities"": { // use Chrome as the default browser for tests
                ""browserName"": ""chrome"",
                ""javascriptEnabled"": true, // turn off to test progressive enhancement
                ""chromeOptions"" : {
                  ""args"": ['--disable-web-security', 'no-sandbox', '--disable-async-dns']
                }
            }
        },
        ""chrome"": {
            ""desiredCapabilities"": {
                ""browserName"": ""chrome"",
                ""javascriptEnabled"": true, // turn off to test progressive enhancement
                ""chromeOptions"" : {
                  ""args"": ['--disable-web-security', 'no-sandbox', '--disable-async-dns']
                }
            }
        }
    },
    ""params"": {
        ""baseUrl"": ""http://localhost:8080/"",
    }
}
</code></pre>

<p>Sorry for having the files attached instead of expanded on the comment but tho I have been using StackOverflow for a long time, this is my first request. StackOverflow</p>
",https://stackoverflow.com/questions/45180166/uable-to-access-to-localhost8080-after-upgrading-nodejs-to-8-1-4,"['node.js', 'selenium', 'nightwatch.js']",83,FALSE,0,1
Google Authentication with Protractor,"<p>I have only been able to track down <a href=""https://stackoverflow.com/questions/20959748/e2e-protractor-test-requiring-oauth-authentication/33831771?noredirect=1#comment74227812_33831771"">this link</a> to solve my problem. I am trying to use protractor to run e2e testing. This is my first go at it, and I like it. However my project requires Google Authentication, then once authenticated, I compare it to my database to make sure the user is in the project. I cannot figure out from the stackoverflow post how to call to the Google Auth page object demee is talking about in the last answer. Also the first person says to find element by.id('Email') and by.id('Passwd') which may be a problem, because my google auth is coming up in another window. So I am not sure how to call to that with Protractor. Here is some of my code after I initialize the $window once gapi is loaded:</p>

<pre><code>.controller('ContainerController', ['$scope', '$rootScope', '$state','$window', '$location','employeeFactory', 'employeeTestFactory', function ($scope, $rootScope, $state, $window,$location, employeeFactory, employeeTestFactory) {
        $rootScope.callRequests=function(){};
        $rootScope.callInfo=function(){};
        if(typeof $rootScope.gapi !== ""undefined"")gapi.load('client:auth2', initClient);
        $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){
            if(typeof $rootScope.gapi === ""undefined"") return;
            gapi.load('client:auth2', initClient);
        })
        $scope.$state = $state;
        $window.initGapi = function() {
            gapi.load('client:auth2', initClient);
            $rootScope.gapi = gapi;
        }
        $rootScope.calculateUsed = function(val){
            $rootScope.employee.timePending = $rootScope.employee.timePending = 0;
            var newTimeUsed = 0;
            angular.forEach(val, function(key, value){
                var td = key.timeDuration;
                if(key.timeState === ""pending""){
                    $rootScope.employee.timePending += Number(td);
                }else{
                    newTimeUsed += Number(td);
                }
            });
            $rootScope.employee.totalTimeUsed = newTimeUsed;
        }

        $scope.employeeType = $rootScope.email = """";
        function initClient() {
            gapi.client.init({
                apiKey: 'AIzaSyDaMf0eviuFygt1hzwQz03a2k2lrLDnpIc',
                discoveryDocs: [""https://people.googleapis.com/$discovery/rest?version=v1""],
                clientId: '977491754644-954b83j2evmq65v6kchq4dsd9j0ud4vg.apps.googleusercontent.com',
                scope: 'profile'
            }).then(function () {                    gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);                    updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());
                $scope.employee = [];
            });
        }

        function updateSigninStatus(isSignedIn) {
            if (isSignedIn) {
                getEmailAddress();
            }else{
                $state.go('app');
            }
        }

        $scope.handleSignInClick = function(event) {
            if(!gapi.auth2.getAuthInstance().isSignedIn.get()){
                gapi.auth2.getAuthInstance().signIn();
            }
        }

        $scope.handleSignOutClick = function(event) {
            if(gapi.auth2.getAuthInstance().isSignedIn.get()){
                gapi.auth2.getAuthInstance().signOut();
            }
        }

        function getEmailAddress() {
            gapi.client.people.people.get({
                resourceName: 'people/me'
            }).then(function(response) {

                $rootScope.email = response.result.emailAddresses[0].value;
                $rootScope.callRequests();
                $rootScope.callInfo();
        //Here is where I compare google to my db and route users back to main if not in db                employeeTestFactory.get($rootScope.email).then(function(message) {
                    if(typeof message.employeeid === ""undefined""){
                        $state.go('app');
                    }else if($location.path() === ""/""){
                        $state.go('app.employee');
                        $rootScope.employee = message;

                    }else{
                        $rootScope.employee = message;

                    }
                });

            }, function(reason) {
                console.log('Error: ' + reason.result.error.message);
            });
        }
    }])

    .controller('LoginController', ['$scope', '$state', '$window', '$http','$rootScope', '$timeout', 'GooglePlus', 'gapiService', function ($scope, $state, $window, $http, $rootScope, $timeout, GooglePlus, gapiService) {

        $scope.$state = $state;
        $scope.callme = function(){
            $scope.handleSignInClick();
        }


        // if it could not be loaded, try the rest of
        // the options. if it was, return it.

        var url;
        var windowThatWasOpened;

        $http.get(""url"").then(function(response) {
            url = response.data;
        });

        $scope.login = function() {
            windowThatWasOpened = $window.open(url, ""Please sign in with Google"", ""width=500px,height=700px"");
        }


        window.onmessage = function(e) {

            if(windowThatWasOpened) windowThatWasOpened.close();
            var urlWithCode = e.data;

            var idx = urlWithCode.lastIndexOf(""code="");
            if(idx === -1) return;
            var code = urlWithCode.substring(idx + 5).replace(""#"","""");

            $http.get(""token?code="" + code).then(function(response) {
                var userurl = 'https://www.googleapis.com/plus/v1/people/me?access_token='+response.data.access_token;
                $http.get(userurl).then(function(response) {
                    console.log(""user info: ""+JSON.stringify(response.data));
                })
            });


        } 
    }]) 
</code></pre>

<p>And here is the code I am trying to navigate to google with:</p>

<pre><code>describe('Protractor Demo App', function() {
  it('should have a title', function() {
    browser.get('http://localhost:9000/');

    element(by.id('gLogin')).click().then(function(){
      Google.loginToGoogle();
    });

    expect(browser.getTitle()).toEqual('TrinityIT Time Off Tracking');

     browser.sleep(5000);
  });
});
</code></pre>

<p>And here is my conf file:</p>

<pre><code>exports.config = {
  framework: 'jasmine',
  specs: ['googlePage.js','spec.js'],
  onPrepare: function () {
    global.isAngularSite = function (flag) {
      console.log('Switching to ' + (flag ? 'Asynchronous' : 'Synchronous') + ' mode.')
      browser.ignoreSynchronization = !flag;
    },
      global.BROWSER_WAIT = 5000;
  }
}
</code></pre>
",https://stackoverflow.com/questions/43639694/google-authentication-with-protractor,"['angularjs', 'protractor', 'google-oauth']",1273,TRUE,1,1
Drag and Drop with Protractor in AngularJS,"<p>I appreciate there's quite a bit of stuff already been said about automating drag and drop as part of E2E testing. However after many, many hours of fiddling around, I cannot get any of the methods described to work...that is using Functions, coordinates etc etc. Oddly enough, console.log maintains the tests have passed, but the screenshots clearly show nothing has happened.
<a href=""https://i.stack.imgur.com/lURrc.png"" rel=""nofollow noreferrer"">Screenshots shows a portion of the application</a></p>

<p>The user selects a paper and drags onto the image. As the drag 'starts' the grey overlay on the image clears and the paper is rendered on the room.</p>

<p>The code snippet shows one of the more simple ideas I've tried and I would be very pleased to receive any help going!</p>

<pre><code>const JS_HTML5_DND = 'function e(e,t,n,i){var r=a.createEvent(""DragEvent"");r.initMouseEvent(t,!0,!0,o,0,0,0,c,g,!1,!1,!1,!1,0,null),Object.defineProperty(r,""dataTransfer"",{get:function(){return d}}),e.dispatchEvent(r),o.setTimeout(i,n)}var t=arguments[0],n=arguments[1],i=arguments[2]||0,r=arguments[3]||0;if(!t.draggable)throw new Error(""Source element is not draggable."");var a=t.ownerDocument,o=a.defaultView,l=t.getBoundingClientRect(),u=n?n.getBoundingClientRect():l,c=l.left+(l.width&gt;&gt;1),g=l.top+(l.height&gt;&gt;1),s=u.left+(u.width&gt;&gt;1)+i,f=u.top+(u.height&gt;&gt;1)+r,d=Object.create(Object.prototype,{_items:{value:{}},effectAllowed:{value:""all"",writable:!0},dropEffect:{value:""move"",writable:!0},files:{get:function(){return this._items.Files}},types:{get:function(){return Object.keys(this._items)}},setData:{value:function(e,t){this._items[e]=t}},getData:{value:function(e){return this._items[e]}},clearData:{value:function(e){delete this._items[e]}},setDragImage:{value:function(e){}}});if(n=a.elementFromPoint(s,f),!n)throw new Error(""The target element is not interactable and need to be scrolled into the view."");u=n.getBoundingClientRect(),e(t,""dragstart"",101,function(){var i=n.getBoundingClientRect();c=i.left+s-u.left,g=i.top+f-u.top,e(n,""dragenter"",1,function(){e(n,""dragover"",101,function(){n=a.elementFromPoint(c,g),e(n,""drop"",1,function(){e(t,""dragend"",1,callback)})})})})';


describe('Drag and Drop Test', function() {
it('should drag', function () {



    var e1 = element(by.xpath('html/body/webapp-app/div/div/webapp-johnlewis-visualiser/div/div[2]/div/digitalbridge-shortlist/div/div/ul/li[1]/a/img'));
    var e2 = element(by.css('.db-project-designer'));

    element(by.xpath('html/body/webapp-app/div/div/webapp-johnlewis-visualiser/div/div[2]/div/digitalbridge-shortlist/div/div/ul/li[1]/a/img')).click();
    //element(by.xpath('html/body/webapp-app/div/div/webapp-johnlewis-visualiser/div/div[1]/div/div/digitalbridge-project/div/digitalbridge-project-designer/canvas')).click();

    browser.driver.actions().dragAndDrop(e1.getWebElement(),e2.getWebElement()).perform();

    browser.sleep(2000);
});
});
</code></pre>

<p>The constant is showing an error <code>'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). (W104)</code> - I do have ES6 installed in Node_Modules.</p>

<p>I inserted the <code>click</code> line to see if pre-selecting the item made any difference...it didn't!</p>

<p>Thank you</p>

<p>David</p>
",https://stackoverflow.com/questions/47593505/drag-and-drop-with-protractor-in-angularjs,"['angularjs', 'drag-and-drop', 'protractor']",331,TRUE,0,2
protractor showing wrong chromedriver version and unable to run e2e tests,"<p>I'm working with an angular2 web application were we have setup protractor for e2e testing but my all tests are keep failing for some ambiguous error. 
The error is get is </p>

<pre><code>× Full amount can be tendered to card via scanning the device
  - Failed: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
  (Session info: chrome=59.0.3071.115)
  (Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.10586 x86_64)
  - Failed: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
 (Session info: chrome=59.0.3071.115)
 (Driver info: chromedriver=2.26.436362(5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.10586 x86_64)  
</code></pre>

<p>My environment is windows 10, node version is 6.9.1, npm version is 3.8.6, chrome version is 59.xx, chromedriver version is 2.30 but don't know why its showing 2.26 in console along with error. I've tried to update it through npm install chromedriver (both locally and global) and it shows that 2.30 is installed but when I try to run protractor its show chromedriver=2.26.436362 (as you can see in output). I've tried many solution found on internet but nothing worked for me (included upgrading chrome to latest version + chromedriver to latest version, downgrading chrome to 58 and chromedriver to 2.28 etc).</p>

<p>Anything I'm missing in setting up my environment ? Any help would be appreciated. Thanks</p>

<p>*******UPDATE*******</p>

<p>I've upgraded chromedriver version to 2.30 and now started getting different error, it doesn't even start now, error is following</p>

<pre><code>e2e/app/framework/element-functions.ts(43,29): error TS2349: Cannot invoke an expression whose type lacks a call signature.
e2e/app/framework/wait-functions.ts(45,18): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Promise&lt;{}&gt; | Condition&lt;{}&gt; | ((driver: WebDriver) =&gt; {})'.
Type 'Function' is not assignable to type '(driver: WebDriver) =&gt; {}'.
Type 'Function' provides no match for the signature '(driver: WebDriver): {}'
node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts(43,43): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/blockingproxy.d.ts(40,13): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(11,39): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(18,42): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/client.d.ts(19,22): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts(17,43): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(14,47): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(21,52): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(29,56): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts(37,52): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts(14,90): error TS2304: Cannot find name 'Promise'.
node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts(23,43): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(31,22): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(48,26): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(62,25): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(76,28): error TS2304: Cannot find name 'Promise'.
node_modules/protractor/built/plugins.d.ts(94,55): error TS2304: Cannot find name 'Promise'.
</code></pre>
",https://stackoverflow.com/questions/45081137/protractor-showing-wrong-chromedriver-version-and-unable-to-run-e2e-tests,"['node.js', 'google-chrome', 'selenium-webdriver', 'protractor', 'selenium-chromedriver']",1043,FALSE,0,1
Elegant Protractor Logging on browser.wait(),"<p>For some time now, our team has been using the Protractor/Jasmine combo in order to do E2E testing and it has worked out great for us. </p>

<p>Recently, I've been assigned the task of improving the logging and have noticed 2 areas in our code where the logging could be improved.</p>

<p>One of these areas is with using <code>browser.wait()</code>. We're currently using the method in the form of <code>browser.wait(condition, timeOut)</code> and excluding the third parameter which is a message to be written to the console in case of a failure.</p>

<p>I decided to comb the code and insert a message into each of these methods and the result has been OK. Although the code works, I'm wondering if there is a more elegant way of doing this. </p>

<p>I'm currently saving the XPath of whatever element I'm waiting on and then if that fails, displaying a message in the form: <code>getWait() timeout due to &lt;element_name&gt; { XPath = &lt;element_XPath&gt; } being not visible or enabled such that you can click it.</code> The pattern changes if we're using <code>isPresent()</code>, <code>elementToBeClickable()</code>, <code>visibilityOf()</code>, etc.</p>

<p>Is there a way of getting the current context of the code I'm executing when <code>browser.wait()</code> is executed? Can I instead display the element or more information on what caused the timeOut? </p>

<p>Let me know if I can clarify further. Thanks</p>
",https://stackoverflow.com/questions/46449814/elegant-protractor-logging-on-browser-wait,"['xpath', 'protractor', 'e2e-testing']",193,TRUE,0,1
E/launcher - Error: TSError: Unable to Compile Typescript,"<p><strong>Hey guys, I am facing following problem:</strong></p>

<p>My Project is built on Angular4 with typescript, e2e testing with protractor &amp; karma. But since a few days I keep getting following error:</p>

<pre><code>File 'D:/myproject/node_modules/protractor/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (
6054)
File 'D:/myproject/node_modules/q/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)
File 'D:/myproject/node_modules/selenium-webdriver/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.
d.ts'. (6054)
File 'D:/myproject/node_modules/source-map/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (
6054)
File 'D:/myproject/node_modules/tapable/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (605
4)
File 'D:/myproject/node_modules/tslib/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6054)

File 'D:/myproject/node_modules/uglify-js/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'. (6
054)
File 'D:/myproject/node_modules/webdriver-js-extender/node_modules/selenium-webdriver/package.json' has unsupported extension. The only support
ed extensions are '.ts', '.tsx', '.d.ts'. (6054)
File 'D:/myproject/node_modules/webdriver-js-extender/package.json' has unsupported extension. The only supported extensions are '.ts', '.tsx',
 '.d.ts'. (6054)
    at getOutput (D:\myproject\node_modules\ts-node\src\index.ts:300:15)
    at D:\myproject\node_modules\ts-node\src\index.ts:330:16
    at Object.compile (D:\myproject\node_modules\ts-node\src\index.ts:489:17)
    at Module.m._compile (D:\myproject\node_modules\ts-node\src\index.ts:382:43)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .ts] (D:\myproject\node_modules\ts-node\src\index.ts:385:12)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
[23:41:57] E/launcher - Process exited with error code 100
</code></pre>

<p>As I understand the error message, the typscript loader tries to transpile non-ts files. For sure I have searched the whole internet before posting my question, and it looks like something with the @types within my <a href=""https://www.typescriptlang.org/docs/handbook/tsconfig-json.html"" rel=""nofollow noreferrer"">tsconfig.json</a> is not working properly.</p>

<p>I have checked the documentation for @types and tsconfig and related issues on github, but I think it's not behaving correctly here. The Docs state that,</p>

<blockquote>
  <p>only files with supported extensions are included (e.g. .ts, .tsx, and
  .d.ts by default with .js and .jsx if allowJs is set to true).</p>
</blockquote>

<p>Then why is it trying to include all the .json files?</p>

<hr>

<blockquote>
  <p><strong>tsconfig.json</strong></p>
</blockquote>

<pre><code>{
  ""compilerOptions"": {
    ""target"": ""es5"",
    ""module"": ""commonjs"",
    ""moduleResolution"": ""node"",
    ""emitDecoratorMetadata"": true,
    ""experimentalDecorators"": true,
    ""allowSyntheticDefaultImports"": true,
    ""sourceMap"": true,
    ""noEmit"": true,
    ""noEmitHelpers"": true,
    ""importHelpers"": true,
    ""strictNullChecks"": false,
    ""lib"": [
      ""dom"",
      ""es6""
    ],
    ""typeRoots"": [
      ""node_modules/@types""
    ],
    ""types"": [
      ""hammerjs"",
      ""jasmine"",
      ""node"",
      ""source-map"",
      ""uglify-js"",
      ""webpack""
    ]
  },
  ""exclude"": [
    ""node_modules"",
    ""dist""
  ],
  ""awesomeTypescriptLoaderOptions"": {
    ""forkChecker"": true,
    ""useWebpackText"": true
  },
  ""compileOnSave"": false,
  ""buildOnSave"": false,
  ""atom"": {
    ""rewriteTsconfig"": false
  }
}
</code></pre>

<p>Detailed Information about myproject:</p>

<blockquote>
  <p>node v7.4.0</p>
  
  <p>npm  v4.1.2</p>
  
  <p>typescript@2.3.4</p>
  
  <p>protractor@5.1.2</p>
</blockquote>

<pre><code>├── src/
│   ├── custom-typings.d.ts
├── node_modules/
│   ├── @types
│   |   ├── hammerjs
│   |   |   ├── index.d.ts
│   |   |   ├── package.json
│   |   |   ├── README.md
│   |   |   ├── types-metadata.json
│   |   ├── jasmine
│   |   |   ├── index.d.ts
│   |   |   ├── ...
│   |   ├── node
│   |   |   ├── index.d.ts
│   |   |   ├── ...
│   |   ├── source-map
│   |   |   ├── index.d.ts
│   |   |   ├── ...
│   |   ├── uglify-js
│   |   |   ├── index.d.ts
│   |   |   ├── ...
│   |   ├── webpack
│   |   |   ├── index.d.ts
│   |   |   ├── ...
│   |   ├── ...
│   └── (@agm, @angular, ...)
└── package.json
</code></pre>

<p><strong>What I have already tried:</strong></p>

<ul>
<li>removing exclude block, as it contains same as default value:</li>
</ul>

<blockquote>
  <p>The ""exclude"" property defaults to excluding the node_modules, bower_components, jspm_packages and  directories when not specified.</p>
</blockquote>

<ul>
<li><p>setting option ""allowJs: true"", resulted in missing loader for files (not an appropriate solution)</p></li>
<li><p>removing typeRoots to use default settings, resulted in same error</p></li>
</ul>

<p>How can I solve this, to load only appropriate .ts files?
Thanks in advance for any help!</p>

<ul>
<li>adding <code>""include"": [
""src/**/*""
]</code> or <code>""include"": [
""src/**/*.ts""
]</code> - resulted in the same error</li>
</ul>

<hr>

<p>additional resources:</p>

<ul>
<li><a href=""https://pastebin.com/Hx8Ddf2V"" rel=""nofollow noreferrer"">installed packages and versions</a></li>
</ul>
",https://stackoverflow.com/questions/44400683/e-launcher-error-tserror-unable-to-compile-typescript,"['node.js', 'typescript', 'ts-node']",3718,FALSE,0,0
Selenium Setup With Node and Nightwatch,"<p>So I am currently trying to see what a very basic selenium setup with a Node.js would look like for Work so we can begin to implement E2E testing.</p>

<p>So i spun up a basic node.js server with express</p>

<pre><code>const express = require('express');
const path = require('path')
const app = express()
const PORT = 3000

app.use(express.static('public'))

app.get('/', (req,res) =&gt; res.status(200).end() );


app.listen(PORT, 'localhost', (req,res) =&gt; console.log(`port running on ${PORT}`))
</code></pre>

<p>I spun up a very basic html/css/js FE for the sake of testing</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=""en""&gt;
&lt;head&gt;
    &lt;meta charset=""UTF-8""&gt;
    &lt;title&gt;Document&lt;/title&gt;
&lt;/head&gt;
  &lt;link rel=""stylesheet"" href=""./styles.css""&gt;
&lt;body&gt;
    &lt;div id=""testing-file""&gt;
        This is a test
        &lt;span&gt;
            &lt;p id=""ryan""&gt;Ryan&lt;/p&gt;
        &lt;/span&gt;
    &lt;/div&gt;
    &lt;script&gt;
        console.log('hello')
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>//styles</p>

<pre><code>  #testing-file {
    color: red;
    font-size: 2em;
}

#ryan {
    color: blue;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
</code></pre>

<p>Now here is the testing setup, this is my first time using Selenium and really trying to setup E2E from scratch like this. So, after reading the documentation all morning im coming here.</p>

<p>Nightwatch.json file</p>

<pre><code>    {
  ""src_folders"" : [""tests""],
  ""output_folder"" : ""reports"",
  ""custom_commands_path"" : """",
  ""custom_assertions_path"" : """",
  ""page_objects_path"" : """",
  ""globals_path"" : """",

  ""selenium"" : {
    ""start_process"" : false,
    ""server_path"" : """",
    ""log_path"" : """",
    ""port"" : 9515,
    ""cli_args"" : {
      ""webdriver.chrome.driver"" : ""./chromedriver/"",
      ""webdriver.gecko.driver"" : """",
      ""webdriver.edge.driver"" : """"
    }
  },

  ""test_settings"" : {
    ""default"" : {
      ""launch_url"" : ""http://localhost:3000"",
      ""selenium_port""  : 9515,
      ""selenium_host""  : ""localhost"",
      ""silent"": true,
      ""screenshots"" : {
        ""enabled"" : false,
        ""path"" : """"
      },
      ""desiredCapabilities"": {
        ""browserName"": ""firefox"",
        ""marionette"": true
      }
    },

    ""chrome"" : {
      ""desiredCapabilities"": {
        ""browserName"": ""chrome""
      }
    },

    ""edge"" : {
      ""desiredCapabilities"": {
        ""browserName"": ""MicrosoftEdge""
      }
    }
  }
}
</code></pre>

<p>nightwatch.js file</p>

<pre><code>module.exports = {
    src_folders: ['test/e2e/']
}
</code></pre>

<p>test.js file</p>

<pre><code>module.exports = {
    'step one' : browser =&gt; {
        browser
          .url('http://localhost:3000')
          .waitForElementVisible('body', 200);
    }
}
</code></pre>

<p>Now im getting the basics going but when I run the test I recieve the error: </p>

<pre><code>[E2e\test] Test Suite
=========================

Running:  step one
Error processing the server response:
 unknown command: wd/hub/session

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{ value: -1, error: 'Unexpected token u in JSON at position 0' }
</code></pre>

<p>So my belief is of course I have not setup the selenium web driver correctly and that's most likely what my issue is as it's been pretty difficult. Things to note, I am on windows. I did set my PATH variable to the path that I have the selenium driver in inside of my project folder. It seems to try to run the test but the issue looks like it's going to be related to the selenium driver not spinnning up.</p>

<p>My Node server is on 3000, just serving up static files and selenium if I double click on the windows web driver application says the driver is on port 9515. Now everything i've read thus far online says the port on 4444, but i don't really understand what im reading right now. So basically i need to run a simple test on the browser, chrome. Let me know if any other information is needed</p>
",https://stackoverflow.com/questions/42654569/selenium-setup-with-node-and-nightwatch,"['javascript', 'selenium', 'testing', 'nightwatch.js', 'e2e-testing']",595,TRUE,0,1
