Questions tagged [protractor]

An end-to-end test framework for AngularJS applications. Protractor runs tests against applications running in a real browser, interacting with it as a user would.

0
votes
1answer
235 views

Why does Selenium suddenly skips all my tests?

I'am used to run the E2E test couple of times a day during development... Today It suddenly skips all my test and all my spec files register.e2e-spec.ts I didn't do any changes or updates on my spec ...
0
votes
1answer
368 views

javascript isPresent always returning TRUE (Protractor)

So, I am accessing an application. There are multiple employee records. However, there are no duplicate records. I am deleting an employee record and then trying to verify that the employee record ...
1
vote
2answers
2k views

Need help with passing a variable in xpath

I am automating my application using Protractor. For one of the elements, I am using xpath, which is as follow: element(by.xpath('//ul[@id="employee-list"]/li[contains(text(),"Master Shifu")]')); ...
2
votes
0answers
2k views

How to stop for loop when I found the element. In Protractor [closed]

for (var i=1; i<8 ; i++) { var eleClick = element(by.xpath("//*[text()='Choices for Independence-Guidelines - 3705']")); eleClick.isPresent().then(function(result){ if(result) { ...
2
votes
1answer
460 views

How can i click on Save button to save a downloaded file using protractor in IE

How can i click on Save button to save a downloaded file using protractor in IE.
0
votes
0answers
215 views

Cucumber JS Step Definitions Coming Incorrect For Scenario Outline

Currently working with the .js port of Cucumber - CucumberJS. I am facing this issue where the scenario outline steps are not coming in the defined step. My Scenario is pretty simple Scenario ...
1
vote
1answer
789 views

Not able to check the checkboxes on a javascript page

Here is the code I used to select the checkboxes selectAllEmployeeInputRequired() { this.scrollToAndClick(this.employeeInputButton); return browser.wait(this.isVisible(this.employeeInputModalForm)) ...
1
vote
2answers
872 views

What to change in protractor configuration if moving to vue.js?

My company is going to slowly transition from angular.js to vue.js. I have protractor tests set up and running successfully. Aside from the page objects specific to angular, is there anything that ...
1
vote
2answers
253 views

E2E - Is it possible to share data between e2e.spec files?

I do have 2 *.e2e-spec.ts files for an E2E testing. So now I would like to share data between these files. e.g. an email which is used for a signup signup-e2e.spec.ts and I would like to use it for ...
0
votes
1answer
360 views

Unable to run protractor test in browserstack on ios device

I am trying to run protractor test(ios-11, iPhoneX)in browserstack. I am getting "Error: Error while running testForAngular: Unable to communicate to node" error and some time I am getting the error ...
0
votes
0answers
1k views

How to import and use Angular Environment variables in `protractor.config`?

I would like to save some credentials in the angular environment.prod file and pass them to protractor.config.js Is it possible to import and use env variables from the Angular app environments files....
2
votes
0answers
761 views

Protractor starts Firefox but doesn't run any tests

Problem is the web app i'm testing is behind 2 basic auths and requires a proxy. I wanted to pass the two basic auths by adding AutoAuth addon in a FireFox profile and setting up that profile to load ...
1
vote
1answer
3k views

How to make a variable in `protractor.conf.js` available in spec file?

I have a variable in protractor.conf.js which is exported within onPrepare() function as: global.myVariable = myVariable, and in spec file I'am trying to use/call it, but it seems that it can't be ...
2
votes
1answer
765 views

Protractor- in same page how to switch from non angular to angular, its clicking on non angular elements but not on angular?

In same page how to switch from non angular to angular, it is clicking on non angular elements but not on angular, when click on non angular lookup then angular window(Popup) will open
2
votes
1answer
1k 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. ...
1
vote
1answer
591 views

E2E: How to execute click event twice and successively - without any error?

I do have a register process/form which passes email, password, confirmPass and a tc checkbox which has a boolean value. When the user submits the form, an open dialogue with a text opens and in the ...
2
votes
1answer
730 views

e2e test fails inconsistently

I do have an e2e test for an Angular app. It works fine on my local machine, but on the production repo, it runs inconsistently.. in other words sometimes it fails but sometimes it's runs successful. ...
1
vote
4answers
5k views

Protractor - jasmine; How to click submit button

Our dev has a submit button like this: <button _ngcontent-c6="" class="btn btn-block btn-primary mt-lg" type="submit">Login</button> I tried using: element(by.buttonText('#submit')); ...
1
vote
3answers
7k views

Switching to iframe using Protractor

Anyone have experience/guidance on switching to an iFrame using Protractor? The iFrame opens and I have a wait for a specific button on top of the iFrame that is a separate module but cannot get focus ...
0
votes
1answer
3k views

Protractor : How to resolve “failed loading configuration file conf.js”

I'm new to protractor, can somebody tell me how to fix error code 105 Q$ protractor conf.js [16:29:26] E/configParser - Error code: 105 [16:29:26] E/configParser - Error message: failed loading ...
4
votes
2answers
281 views

How to utilize javascript asynchronicity to speed up test execution?

How to utilize javascript asynchronicity to speed up test execution in protractor tests other than running tests in parallel? **Note:**This question is about utilizing core features of JavaScript ...
0
votes
2answers
7k views

Get current time in HH:MM format

How to get the current time and send it in HH:MM format in a field to schedule an event at the current time using Protractor?
1
vote
1answer
3k views

E2E - How to test login with fake data - username and password?

I do have an angular login page build as a SPA: http://localhost:port/login which works fine. And I wrote an E2E integration test for that. It runs fine regarding checking the input-text for username ...
2
votes
1answer
2k 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 ...
3
votes
2answers
2k views

Selenium for angular - How to install and run Selenium for Angular E2E testing?

The question seems to be asked in some other Postings here, but I'am relative new to testing with selenium. I would like to use it for testing an angular app - E2E. I have been reading few postings ...
5
votes
2answers
3k views

PROTRACTOR:How to tell protractor to stop or skip the TEST if any Test case is failed

Current Behavior: If any TestCase is Failed, Protractor not continuing with the next Testcase and holding to the same failed Testcase . Waits for long time and throws A Jasmine spec timed out. ...
1
vote
1answer
3k views

Running Protractor tests from Jenkins

Usually, I used to run from command line (protractor config.js). I used protractor and java script. PLS LET ME KNOW STEPS TO ACHIEVE RUNNING FROM JENKINS To run from Jenkins , I created a batch file ...
2
votes
1answer
2k 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 ...
0
votes
1answer
585 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: &...
2
votes
0answers
335 views

Can't swipe open Ionic ion-menu with Protractor

We have this Ionic3 ion-menu (hidden left side slide-out menu) which we have to swipe it open to the right so that it shows. On Chrome with the click of the mouse it can be easily done. But can't make ...
5
votes
2answers
656 views

AngularJS testing with Protractor- How to make test scripts portable?

I was recently tasked with integrating some automated testing into the development life cycle for one of my company's products. The product has been developed using AngularJS, and has gone through ...
2
votes
2answers
935 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 ...
3
votes
1answer
2k views

Async/Await with CucumberJS

For my project, I am moving the code to the async/await model, thus disabling the control flow. While doing this, I am having persistent problems with the callbacks() and async tasks being either ...
2
votes
3answers
2k views

AngularJS testing using Protractor- how to close a dialog that opens automatically in order to continue with tests?

I am developing a test suite for one of my company's products- the product has been written in AngularJS, and I am using Protractor as the testing tool. Having never really used automated testing ...
1
vote
1answer
570 views

Is there a way to setup WebStorm to execute Javascript/Protractor code in place using Evaluate Expression tool?

I'm coming from a Java+Selenium environment, so maybe this is a mismatch of understanding that I'm having with Javascript/Angular/Protractor. I used to use IntelliJ's IDEA IDE for automation testing. ...
4
votes
2answers
11k views

Correct Strategy for Element to be not present in DOM

I have scratching my heads around this problem for two days. I have a test where I need to check if a spinner is not visible to the user. This is the first test of a series of tests, and until the ...
3
votes
1answer
727 views

Cucumber with Protractor - Multiple Features Not Executed Properly

I have a pretty small POM based project for learning Cucumber with Protractor. I am using TypeScript. I am trying to perform pretty basic actions (clicking on button, clicking on a menu item) on ...
14
votes
4answers
11k views

Moving from Selenium to Protractor

I have been using Selenium/Java/Maven for functional automation testing in my project. But since angular is getting a lot of popularity, the development team has started using it for the development ...
1
vote
1answer
3k 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 ...
2
votes
1answer
1k views

Testing AngularJS with Protractor- how to use services from within my tests?

I have recently started developing an automated test suite for one of my company's products, which has been written in AngularJS, using Protractor as the testing framework (although I have used ...
1
vote
0answers
741 views

Partial text sent when using SendKeys in Protractor

Inconsistently, partial text is being sent when using SendKeys and causes a particular spec to fail. Below is the test that needs to happen for the other tests to past successfully it('should select ...
3
votes
1answer
985 views

Limit on clearing session storage through out a test suite in Protractor?

I have a test suite that accesses a URL multiple times and needs to complete a user registration. The individual specs all use the following to clear the session afterAll(function() { browser....
1
vote
1answer
541 views

Cannot run tests using Protractor and Saucelabs

I'm trying to run my e-2-e tests using protractor and saucelabs. When I run protractor I see the following output: protractor conf.js [15:56:40] I/launcher - Running 1 instances of WebDriver ...
3
votes
2answers
1k views

Using Protractor to test AngularJS frontend- how do I get HTML DOM objects that are nested within other objects?

I am working on the development of an AngularJS app, and have recently been asked to look at integrating some automated testing into our development process. I have not used automated testing at all ...
0
votes
1answer
1k views

How to store a generated link as a variable in protractor

Enabling certain options on a page will generate a link that I need to store. The link is located in the page object file by element(by.css('a[href*="link"]')); I need to figure out how to store ...
1
vote
1answer
414 views

Integrating Protractor testing framework into my existing AngularJS app- invalid URL when testing on VM

I recently started working on an application that has been written in AngularJS, and have been tasked with setting up automated testing for the app (all of the testing that has been done as part of ...
2
votes
1answer
1k views

AngularJS- setting up Protractor to test front-end user interaction

I am working on an AngularJS app, and am looking to add some automated testing to the development life cycle of the project. After doing a bit of research, and asking on here about what frameworks ...
2
votes
1answer
1k 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. **...
2
votes
0answers
189 views

Multiple protractor tests creation using loops based on returned promise value

I would like to dynamically generate it blocks based on the values returned by a promise. Something along these lines: describe('Main Page', function() { var rowNumber=event.script1(); //---...
1
vote
1answer
1k views

PROTRACTOR: How to Run Few Spec on firefox browser and few spec on Chrome browser?

I have 10 test cases, In which first 8 test cases should run in Chrome browser and next 2 test cases should run in Firefox browser. I have tried below code: in conf.js var jasmineReporters = ...