Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [jasmine]

Jasmine is a behavior-driven development (BDD) framework for testing JavaScript code. Jasmine has no external dependencies and does not require a DOM.

Filter by
Sorted by
Tagged with
10 votes
3 answers
4k views

What are the limitations of chrome headless browser?

We have written bunch of test cases for code coverage using jasmine javascript. First of all, we are using phantom JS to run the test cases. While test case counts are persistently increased test ...
Thiru Arasu's user avatar
9 votes
1 answer
7k views

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

I would like to be able to run a subset of it's or describe's in a Jasmine test file using jest with some type of tagging system. I know I can indicate a filter of sorts by using a word after the ...
S.Huston's user avatar
  • 167
8 votes
3 answers
2k views

End-to-end tests are running for 5 hours

This is a continuation of Speeding up end-to-end tests topic, but a more specific one. Currently, it takes ~5 hours for our daily end-to-end testing run to complete. What can we do to improve on ...
alecxe's user avatar
  • 11.4k
7 votes
1 answer
208 views

Test Quarantine in Protractor

Follow-up to How to deal with flaky tests? One of the approaches to tackle flaky tests is to temporarily quarantine the tests - move them to a special "bucket" with other flaky tests: I offer one ...
alecxe's user avatar
  • 11.4k
6 votes
1 answer
1k views

Why Phantomjs got crashed while running more test cases?

I have written 751 test cases in Jasmine JavaScript. 116 test cases for Mobile View and 645 test cases on Desktop view. While executing test cases, most of the times, test case execution was not ...
Thiru Arasu's user avatar
5 votes
1 answer
14k views

AngularJS testing with Protractor- no element found using locator

I have just recently started working on integrating a test framework into my AngularJS application, using Protractor do build the test cases & run the tests. Having never used automated testing ...
Noble-Surfer's user avatar
5 votes
0 answers
1k views

Karma/ Jasmine testing framework - tests don't appear to be executed

I am looking to implement the Karma/ Jasmine test suite/ framework for use with my AngularJS app. Having never used a testing framework previously, I have followed the tutorial - to give it a go, ...
Noble-Surfer's user avatar
4 votes
2 answers
1k views

Protractor Image didn't upload on dialog box?

I want to test the image upload functionality using Protractor but my written script didn't work. When we click on the dialogue box image it opens the window to select the desired image. After the ...
Shakeel 's user avatar
3 votes
6 answers
12k views

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

What testing tool to use for automating user acceptance testing? The app itself uses react. Should I use Selenium with various wait strategies, Jasmine or a different tool?
Michael Durrant's user avatar
3 votes
2 answers
889 views

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

What I'm looking for in an answer Concrete relevant(newer?) examples of why one choice is better than the other OR, a concrete suggestion of why using a different language is the better choice over ...
S.Huston's user avatar
  • 167
3 votes
1 answer
755 views

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

I am using ng e2e --protractorConfig=e2e/protractor.conf.js to run my e2e test. I want to add a regular expression like @smoke to this command. But when I add --grep='@smoke' to it as: ng e2e --...
user41907's user avatar
3 votes
3 answers
14k views

Can Jasmine tests be executed in a specific order?

I believe it is considered to be a bad practice to rely on the order in which the (acceptance) tests should be run, but for testing "deeply nested features" (I don't know if there is a standard term ...
John Donn's user avatar
  • 131
3 votes
1 answer
465 views

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

I am sharing my spec file, the generated report contains only 'through Gmail Account' text but I want to add 'Password pop up' text and many other headings also. I tried by adding one more 'it' block ...
Rozmeen Ali's user avatar
3 votes
1 answer
2k views

Parallel protractor tests are still running sequentially

Looking For: I want to run Specs in Parallel. Tried: Included in config file: shardTestFiles : true, maxInstances: 4 Output I see: Multiple instances are not opening. Still running in serial. **...
Bustaq's user avatar
  • 403
3 votes
0 answers
2k views

How to clear karma warn web-server 404 error for Service method call?

I am new to TDD. I have configured the karma and gulp for my sources to generate the code coverage. My karma configuration file is given below: browsers: ['Chrome', 'IE', 'Firefox', '...
Thiru Arasu's user avatar
3 votes
0 answers
607 views

Unable to add/attach screenshot and test steps in Report

I am working on protractor and using "protractor-angular-screenshot-reporter" to generate the report. But I am unable to add screenshot and test steps in this report. Can anyone please help ...
vedant's user avatar
  • 31
2 votes
1 answer
6k views

Protractor - How to use async/await

I am completely new to protractor, and I came across the async/await. Using: node version 8.9.4 protractor version 5.3.0. Is it necessary to use async/await in all your script? And how to use with ...
bot13's user avatar
  • 145
2 votes
1 answer
339 views

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

I have started using jQuery and jasmine to automate webpage testing. From what I understand, by calling $( document ).ready() would make sure that a webpage would finish loading. But for the ...
Yu Zhang's user avatar
  • 9,942
2 votes
2 answers
13k views

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

TestCase: Verify the table ROW contains text. To verify text present in Table Row, i tried Using "expect.gettext().toContain(datefinal)". But ouput returns "Expected '7/18/17' to contain undefined."...
Bustaq's user avatar
  • 403
2 votes
3 answers
694 views

Is there a way to capture Jasmine assertions?

Is there a way to capture expect failures in Jasmine? This doesn't work, the exception is not captured. try { expect(1).toBe(3) } catch (e) { } I am looking for something like this TestNG ...
PDHide's user avatar
  • 11.1k
2 votes
1 answer
240 views

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

Get text which are in between tags DOM <div id="div_ResultMessage" class="AlertmsgDiv"> <div id="lblSuccessMessage" class="alert alert-success alert-dismissable"> <div ...
Rao's user avatar
  • 276
2 votes
1 answer
3k views

Protractor: Firefox browser opens but URL is not launched

I am trying to run TestCase in Firefox browser. Result is : Firefox browser opens, but URL is not loading. FIREFOX browser - 53 Selenium- webdriver - 3.6.0 NPM - 3.10.10 Protractor ...
Bustaq's user avatar
  • 403
2 votes
1 answer
7k views

Protractor: How to get text present between two span

I want to get the text (SampleList23.csv) that is present between 2 spans. HTML: <div class="ng-scope" ng-switch-when="false"> <div class="engage-tag ng-binding"> <span ...
Bustaq's user avatar
  • 403
2 votes
3 answers
2k views

How can I locate the navigation element by text?

<li class="nav-item" ng-reflect-ng-class="nav-item,"> <a class="nav-link" href="javascript:void(0);"> <span>By Coordinator &amp; Salesman</span> <!-...
Monika's user avatar
  • 59
2 votes
1 answer
3k views

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

I do have an E2E test for retrieving confirmation email after registration. I need the link in the confirmation email to login the user as the link in the email contains the token etc. for access. ...
k.vincent's user avatar
  • 395
2 votes
1 answer
5k views

Unable to run Protractor tests in Microsoft Edge

I'm working on a project to begin testing Node/Angular applications using Protractor and Jasmine. I have a POC working in most browsers but having a lot of trouble with MS Edge. Here's my ...
kharkins224's user avatar
2 votes
2 answers
2k views

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

Test Case: I wanted to run only one suite (eg) suite 'A'. So i specified the same while running configuration protractor conf.js -- suites A Problem: All Suites (A,B,C,D) are running, instead of ...
Bustaq's user avatar
  • 403
2 votes
0 answers
461 views

How to check children method has been called in jasmine test cases?

We use spyOn(this,"_new") to track a function call in jasmine. I need to check the children method call in jasmine. My code sample is given below, Sample code: function perform(option) { this....
Thiru Arasu's user avatar
2 votes
0 answers
1k views

How to expand upon the error from a Jasmine expect failure?

I'm using Jasmine, FrisbyJS, and Jest to create API tests for my team's product. I want to be able to handle when an expect (which I'm pretty sure Frisby is just using the underlying Jasmine expect) ...
S.Huston's user avatar
  • 167
1 vote
1 answer
357 views

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

I have a total of 200 users. I have one angular page which has showed 20 users on the present page. Now, I want to find a random user which is in any next pages. I have page navigator button on the ...
user avatar
1 vote
1 answer
3k views

Please help with simple test case in jasmine

I am stuck with jasmine. I read/youtubed/googled but seems like I am on the wrong track. Here is what I have so far. I've used protractor --elementExplorer to pull items from http://www.angular.io: &...
user8816197's user avatar
1 vote
2 answers
689 views

How to handle with webdrivers in visual studio code Protractor?

I was getting an error WebDriverError: unknown error: cannot determine loading status from unknown error: missing or invalid 'entry.level' (Session info: chrome=76.0.3809.100) (Driver info: ...
Arslan Khan Afridi's user avatar
1 vote
1 answer
2k views

how do I define global variable in conf.js and used in spec.js file in jasmine protractor?

describe('Enter Base API URL', function() { it('1st scenario', function() { // Take any URL. browser.get('xyz.com'); browser.ignoreSynchronization=true; var user= by.xpath('//...
user avatar
1 vote
1 answer
107 views

Screenshot not found error in protractor

I am getting broken image for screenshot. Unable to take screenshot in protractor framework. Please anyone help on this. My code: testconfig.js file var fs = require('fs-extra'); var today = new Date()...
Lakshmi's user avatar
  • 11
1 vote
0 answers
109 views

Jasmine, how to test a return?

I'm writing some unit tests for our Angular application. In a few instances, we have some code that is like the following. public submit(): void { if (!this.selectedValue) { ...
DrZoo's user avatar
  • 131
0 votes
1 answer
131 views

How to pass automation test case data from TFS to Protractor using Cucumber/Jasmine

I am using Visual Studio Code, Protractor, Typescript and Jasmine to build test cases fro Angular website. I need to pick test data from Team Foundation server(TFS) only. It was possible in Coded UI ...
Saur100's user avatar
  • 21
0 votes
1 answer
85 views

Is it possible to use methods in java library or a java project snapshot in a protractor project? [closed]

If I create database testing project using java and export to a snapshot(as a jar), can I use it in a protractor project? Hoping to use in protractor project, protractor,jasmine framework along ...
Syrus's user avatar
  • 1,197
0 votes
3 answers
7k views

How to fix "Cannot find module" error and "Error: ReferenceError: Element is not defined" in protractor?

I have created a test project using page object model. When I run, it creates "Cannot find module" error. I have tried several answers but didn't work. Here is my code Config.js exports....
Syrus's user avatar
  • 1,197
0 votes
1 answer
3k views

Unable to run protractor script

I'm not able to run my protractor tests. Getting the below error: grunt cltest Running "protractor:singlerun" (protractor) task (node:26770) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. ...
Rohan Kalia's user avatar
0 votes
1 answer
842 views

Protractor - How to extract a link from HTML string?

In one of my test cases, I'm able to get the entire HTML e-mail message sent to a user. The message contains text, button, a link, etc. My Issue is that I need to extract the href link in order to ...
k.vincent's user avatar
  • 395
0 votes
1 answer
4k views

How to verify that the menu items (tab/column Elements) are clickable? or Unclickable?

Test Case In My web page, I have 5 tabs (A,B,C,D,E) in which 2 tabs (A,B) are clickable and 3 Tabs(C,D,E) are not clickable. Write a script to verify those tab elements are clickable or not. What ...
Bustaq's user avatar
  • 403
0 votes
1 answer
632 views

How can I find text for span within span?

Following is my code: <span id="agText" class="ag-header-cell-text"> <span style="height: 100%;">Coordinator</span> </span> I was trying the following: var cordinator = ...
Monika's user avatar
  • 59
0 votes
1 answer
268 views

Jasmine web services automation "getting started" doc

I have been working on nightwatchjs from past 6 months, before that I was using Selenium-WebDriver to do browser automation. I have syntactical knowledge of JS and I assume that Jasmine won't bother ...
paul's user avatar
  • 697
0 votes
1 answer
7k views

Why am I getting "RangeError: Maximum call stack size exceeded" when I try to run FrisbyJS tests with Jest?

When I try to run my frisbyjs tests with jest as documented on the github page, I get the following error: RangeError: Maximum call stack size exceeded at String.slice (native) at Object....
S.Huston's user avatar
  • 167
0 votes
1 answer
1k views

Why element locators are not suggested in visual studio code for protractor?

I don't get suggestions for "element(by." element locators in visual studio code. Im using protractor. I have changed the settings file also. Settings.js { "editor.quickSuggestions": { "...
Syrus's user avatar
  • 1,197
-1 votes
1 answer
137 views

How to determine test coverage on a Protractor/Jasmine project

I'm new to a project that is in active development but is a mature application. It has a lot of Protractor/Jasmine tests, but they are organized somewhat poorly. For example, multiple identical or ...
Andy J.'s user avatar