protractor

Is there a way to run particular Protractor test depending on the result of the other test?

允我心安 提交于 2019-12-29 10:02:26
问题 This kind of question has been asked before but most of this question has pretty complicated background. The scenario is simple. Let's say we are testing our favorite TODO app. Test cases are next: TC00 - 'User should be able to add a TODO item to the TODO list' TC01 - 'User should be able to rename TODO item' TC02 - 'User should be able to remove TODO item' I don't want to run the TC01 and TC02 if TC00 fails (the TODO item is not added so I have nothing to remove or rename) So I've been

Protractor Webdriver-manager update SSL error

故事扮演 提交于 2019-12-29 09:24:15
问题 I am getting the following errors with webdriver-manager update . My protractor is at version 5.1.1 my_local_windows_directory>webdriver-manager update events.js:160 throw er; // Unhandled 'error' event ^ Error: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794: at exports._errnoException (util.js:1022:11) at WriteWrap.afterWrite (net.js:801:14) Any ideas to resolve this issue. I am behind a corporate Lan, but I tried BYOD

Doing something aftereach describe in protractor with selenium server with angularjs

♀尐吖头ヾ 提交于 2019-12-29 09:19:12
问题 I want to do something after each describe(not after each testcase) and before each describe, is there any way to do this? I have tried below format, but it gives me error that, before and after not defined, is it possible to do sometask before and after of each describe: describe('testcase', function () { before(function () { -------------- }) beforeEach(function () { ----------------- }) afterEach(function () { -------------- }) after(function () { ----------------- }) it('task1', function

How can I save protractor test results

ぃ、小莉子 提交于 2019-12-29 06:18:28
问题 Is there a way to output protractor test results to a file to be viewed outside of the command line after a test is run, including seeing detailed failures? 回答1: Just the test output is enough? protractor conf.js > test.log Cheers. 回答2: You can also set the resultJsonOutputFile option in the config file: export.config = { (...) // If set, protractor will save the test output in json format at this path. // The path is relative to the location of this config. resultJsonOutputFile:'./result

Getting error: Error while waiting for Protractor to sync with the page: {}

荒凉一梦 提交于 2019-12-29 04:48:08
问题 My e2e.conf.coffee file is: exports.config = baseUrl: 'http://localhost:9001' specs: [ 'e2e/**/*.coffee' ] framework: 'jasmine' I have my node project running and listening on port 9001. My test is: describe 'Happy Path', -> it 'should show the login page', -> console.log browser expect(browser.getLocationAbsUrl()).toMatch("/view1"); it 'should fail to login', -> setTimeout -> console.log "FAIL!" , 1200 And the error that I get is: Failures: 1) Happy Path should show the login page Message:

Should I be using Protractor or Karma for my end-to-end testing? [closed]

北城余情 提交于 2019-12-29 02:21:14
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Should I be using Protractor or Karma for my end-to-end testing? Angular-seed is using Protractor/Selenium WebDriver for E2E but the angular-phonecat tutorial uses karma. I read that I should use Karma for unit tests and Protractor for E2E, which seems fine but I thought I would

Timed out waiting for Protractor to synchronize with the page after 50001ms

℡╲_俬逩灬. 提交于 2019-12-28 18:05:08
问题 I am testing AngularJS app and very new to protractor. Every time I open the browser, it gets opened and then waits for the timeout before throwing the following error on cmd. Timed out waiting for Protractor to synchronize with the page after 50001ms I have tried increasing the timeout limit, but always get this error. I have also tried using all of these: browser.ignoreSynchronization = true; browser.driver.sleep(5000); browser.debugger(); browser.waitForAngular(); The page loads properly

Remove an item from localStorage in a protractor test

醉酒当歌 提交于 2019-12-28 15:46:12
问题 I am trying to remove an entry in the localStorage from a protractor test describe('The feature', function() { beforeEach(function() { browser.executeScript('localStorage.removeItem("key");'); }); it('should do this', function() { }); }); but i get this error when the test is run in chrome UnknownError: <unknown>: Access to 'localStorage' is denied for this document. Storage is disabled inside 'data:' URLs. (Session info: chrome=32.0.1700.77) (Driver info: chromedriver=2.8.241036,platform=Mac

How do I assert an element is focused?

谁说胖子不能爱 提交于 2019-12-28 13:21:10
问题 I am attempting to verify that the focused element is set on page load as one of my tests. This seems to be working, and I can verify with the element explorer, but the Jasmine matchers don't seem to pick up on this. Here's my code: var LoginPage = function () { this.basePath = browser.params.baseUrl; this.loginPart = "/#/login"; this.usernameInput = element(by.model('username')); this.get = function () { ... } } it('should focus on the username field on load', function () { loginPage.get();

how to run protractor test from UI or web interface - just select scenario from github and run

流过昼夜 提交于 2019-12-25 19:08:38
问题 trying to build a UI where anybody can run protractor tests without having knowledge of JS or scripts..they should have scenarios available to them from the github repo and they just choose which one to run 回答1: For this, you don't need to build a UI from scratch. What you need to setup is a Continous Integration Envrionment like Jenkins. Then you can create " Jobs " that contain choice parameters for running different tests. Here is an example of one of my Jenkins Jobs for running the core