Skip to main content
9 votes
Accepted

What tool to use for end to end testing of SPA (Single Page Application)

WebDriverIO / Protractor How about using WebDriverIO or using Protractor since they both are the JS like-version of Selenium, using Cucumber for the BDD syntax. We have a SPA, built using Angular4 , ...
demouser123's user avatar
  • 3,532
6 votes
Accepted

What are the limitations of chrome headless browser?

Headless Chrome is not stable yet in comparison to "full" Chrome. In my opinion there will always be problems with headless vs phantomjs (and others) vs full versions. And so there will always be ...
Piotr Wicherski's user avatar
6 votes

Can Jasmine tests be executed in a specific order?

On Jasmine 3.x, random order is the default behavior. To run in order file written order, you can specify --random=false or use a seed. Docs: https://jasmine.github.io/api/3.3/Configuration.html
João Farias's user avatar
5 votes
Accepted

End-to-end tests are running for 5 hours

A few things to consider come to mind: Only run in Chrome Controversial huh? Let me explain more fully though. My question for multi-browser and indeed multi-device (responsive web sites) testing ...
Michael Durrant's user avatar
5 votes
Accepted

Is there a way to run a subset of tests using Jest?

In true javascript style , the support for this is delayed because of switch to another underlying library , in this case jasmine. There is a -t option here (or --testNamePattern ) which takes a ...
Amias's user avatar
  • 1,212
4 votes

Protractor - How to use async/await

Where to use async-await in Protractor scripts? Async/await statements are only required in places where promise resolution is occurring before moving to the next statement so yes, it is only ...
Vishal Aggarwal's user avatar
3 votes
Accepted

How does $( document ).ready() work?

As it is stated on jQuery site A page can't be manipulated safely until the document is "ready." jQuery detects this state of readiness for you. Code included inside $( document ).ready() will ...
Alexey R.'s user avatar
  • 11.6k
3 votes
Accepted

AngularJS testing with Protractor- no element found using locator

The most important thing in this traceback is actually this part: The following tasks were pending: - $timeout: function () { clearEvents(type); } - $timeout: function setErrorMsg() { // Broadcast ...
alecxe's user avatar
  • 11.4k
3 votes

End-to-end tests are running for 5 hours

Use Docker-compose to run Protractor tests in parallel I would suggest to make tests purely independent and run them in parallel in dockerised containers using Selenium Grid to achieve the desired ...
Vishal Aggarwal's user avatar
3 votes

What are the limitations of chrome headless browser?

I am using headless chrome in version 65 in protractor test execution and I find it pretty stable for a suite of 500+ tests and even for the failed tests screenshots captured are of decent quality and ...
Vishal Aggarwal's user avatar
3 votes

End-to-end tests are running for 5 hours

If you build your tests so that each test can run in isolation. Then you can scale your testruns by running them in parallel. Testing in isolation maybe a bit slower for the individual tests, but it ...
Niels van Reijmersdal's user avatar
3 votes
Accepted

Protractor: How to verify text present in the table row?

You are assigning datefinal to the result of the console.log() call - which is undefined, hence the error. You meant to assert against dateString string: expect(cells.get(6).getText()).toContain(...
alecxe's user avatar
  • 11.4k
3 votes

How can I locate the navigation element by text?

Choosing the best, most reliable and readable locator is not always straightforward. Here, I would rely on the nav-* classes and use the by.cssContainingText strategy: var sellingBranches = element(...
alecxe's user avatar
  • 11.4k
2 votes

How can I add headings to my protractor-jasmine2-screenshot-reports

You are definitely missing some test case grouping and a beforeEach() where you would navigate to an initial "Log In" page. You should have something along these lines: describe('Login', function () {...
alecxe's user avatar
  • 11.4k
2 votes

What tool to use for end to end testing of SPA (Single Page Application)

nightwatch.js module.exports = { 'Demo test Google' : function (client) { client .url('http://www.google.com') .waitForElementVisible('body', 1000) .assert.title('Google') ...
Michael Durrant's user avatar
2 votes
Accepted

Why Phantomjs got crashed while running more test cases?

PhantomJS notoriously has a lot of memory issues and will crash after a certain amount of memory use. I have dealt with this issue by splitting up the tests into separate phantom processes rather than ...
Beetny's user avatar
  • 136
2 votes

Should I use Jasmine/FrisbyJS or Mocha/Chai for testing of live API with Angular?

1) If you're testing at the level of an http request your app's use of angular is almost certainly a non-factor. Angular would matter more were you testing at the browser level ("as a user" basically)....
Cherree's user avatar
  • 1,189
2 votes
Accepted

Protractor: How to get text present between two span

Since your span elements don't have a text, you can basically "ignore" them. In other words, get the parent div element and get the text via getText(): expect($(".engage-tag").getText()).toEqual("...
alecxe's user avatar
  • 11.4k
2 votes

Please help with simple test case in jasmine

You may just use expect() and toEqual() matcher: browser.get('https://angular.io'); expect(element.all(by.css('.nav-link')).getText()).toEqual([ '', 'FEATURES', 'DOCS', 'RESOURCES', 'EVENTS', '...
alecxe's user avatar
  • 11.4k
2 votes
Accepted

Protractor: Firefox browser opens but URL is not launched

Keasav, I understood your problem after your reply, and what's causing that behavior is the (very) old version of the geckodriver that you are using and the Firefox version as well. 1 - So the ...
Raul Huluban's user avatar
2 votes
Accepted

getText() which is in between <div> </div> tag?

Okay I got solution for this: var str = $('#lblSuccessMessage').getText().then(function(text){ console.log(text); var r = /\d+/; console.log((text.match(r)[0])); prno ...
Rao's user avatar
  • 276
2 votes
Accepted

how can I find element on next page, while it is not presenting on present page?

You can't. What you can do is write a loop, that checks: Is the user on the page? No, then click on next page Yes, quit loop and record user element Throw error if after last page the user is not ...
Niels van Reijmersdal's user avatar
2 votes

How to group test cases using regular expression of ng e2e with protractor jasmins3

You may group tests as suites like below: Conf.js suites: { smoke: 'tests/e2e/smoke/*.js', performance: 'tests/e2e/performance/*.js', regression: 'tests/e2e/regression/*.js' ...
Vishal Aggarwal's user avatar
1 vote

Unable to run Protractor tests in Microsoft Edge

After additional time and working with yet another Windows 10 machine I have successfully gotten this simple test to run. I can only conclude that there was something on that particular machine ...
kharkins224's user avatar
1 vote

Protractor Image didn't upload on dialog box?

You are getting this error, because you are trying to use 'sendKeys' method on an element whose type is not 'input'. Use : var fileElem=element(by.css('input[id="cropper-file-input"]'));
Vishal Aggarwal's user avatar
1 vote

Protractor - How to extract a link from HTML string?

Issue fixed. My bad... was thinking more complicated than it's. It's even not something protractor specific. just native JavaScript Solution: var getHref = email['html'].match(/href="([^"]*)/)[1];
k.vincent's user avatar
  • 395
1 vote
Accepted

E2E: Retrieve email-link - How to invoke callBack function for mailListener?

Issue fixed. I think this posting here is really too old and just doesn't work as it should be. First of all here is the one which would run without issues, and you also find the comments which ...
k.vincent's user avatar
  • 395
1 vote
Accepted

Protractor: Specified suite is not running .Instead all suite inside Suites(config.js) is running

How I've done this with protractor in the past is like... single suite protractor config.js --suite A multiple suites protractor config.js --suite A,B,C Note: commas but no spaces between suite ...
Cherree's user avatar
  • 1,189
1 vote

Parallel protractor tests are still running sequentially

As far as I understand this sort of parallel test running, I believe "shardTestFiles" will run test files in parallel but if a test file has multiple test cases those will run sequentially on a single ...
Cherree's user avatar
  • 1,189
1 vote
Accepted

Should I use Jasmine/FrisbyJS or Mocha/Chai for testing of live API with Angular?

I'm relatively new to the MEAN stack, so I had to answer this question for myself in the last 1-2 months. I chose Jasmine/Frisby. Here is why: As you say, there are many tutorials and examples for ...
Boji's user avatar
  • 26

Only top scored, non community-wiki answers of a minimum length are eligible