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 , ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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(...
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(...
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 () {...
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')
...
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 ...
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)....
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("...
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', '...
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 ...
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 ...
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 ...
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'
...
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 ...
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"]'));
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];
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jasmine × 46protractor × 31
javascript × 17
automated-testing × 16
selenium-webdriver × 11
testcase × 4
test-automation-framework × 3
angular × 2
nodejs × 2
e2e × 2
java × 1
performance × 1
unit-tests × 1
api-testing × 1
quality-assurance × 1
visualstudio × 1
uiautomation × 1
documentation × 1
coverage × 1
browsers × 1
web-service × 1
tfs × 1
mock × 1
testing-framework × 1
smoke-testing × 1