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.

Filter by
Sorted by
Tagged with
2
votes
1answer
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. ...
2
votes
1answer
1k 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. ...
2
votes
1answer
4k 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 ...
2
votes
2answers
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 ...
2
votes
1answer
5k views

How to close print dialog box in protractor test

I am doing end-to-end testing with protractor. In a certain test, I need to test like print button is creating pdf or not. So When Test clicks the button, It opens the print window dialog like below. ...
2
votes
2answers
2k views

How to test export functionality?

I have a scenario to test where I need to test that the export functionality is working properly or not. I know that usually in these cases, firstly we check the availability of file in location and ...
2
votes
1answer
3k views

"Failed: Cannot read property 'isPresent' of undefined"

it('should be able to create a task for a product as a CTA', function () { browser.sleep(6222);browser.sleep(6222);console.log("ss"); productPage.productsTab.click(); expect(productPage....
2
votes
1answer
4k views

Protractor - element.all().count() is waiting long where there is no such an elements

I've got problem with some of my protractor tests. In short word, i need to check some numer of elements on my page with number from previous filter. When filter is clicked there should be displayed ...
2
votes
1answer
1k views

Protractor Dynamic numer of test runs depened on count() result

In my Protractor Test suite I have some problem with parametrizing number of tests . it('Login and Count', function () { PageObject.login(); var number = element.all(by.something()).count()....
2
votes
1answer
3k views

Can Protractor tests be run in a mobile device and How?

I have seen that Protractor tests can be run with a Mobile Setup as described in Protractor Documentation, but this means you are running the tests on emulators. What I would like to accomplish is ...
2
votes
1answer
14k views

How to Handle the File Upload dialog in Protractor for IE11?

I know the default answer to handling explorer.exe is to use AutoIT, but AutoIT utilizes Java Runtime to use the exported .exe to upload the file and close the dialog. My tests are all in Protractor ...
2
votes
1answer
585 views

Do not show browser and OS in Selenium console output

I am running Selenium tests (with Protractor) on several browser at the same time to speed up the testing. Jenkins starts the tests and receives the output in a console. To make things more readable ...
2
votes
2answers
3k views

How to attach screenshot to protractor's HTML report?

In my protractor project, i am trying to take an screenshot, and attach it to my html report. The process of taking screenshot is happening in an After hook, as below: import { Status,After, ...
2
votes
0answers
4k 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
0answers
2k 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
509 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 ...
2
votes
0answers
622 views

Protractor custom bindings don't work after multiple redirects

This test does a login on a non-angular site, then switches to angular app and performs the testing. I found that regular bindings by.css work, but custom ones like by.binding don't. describe('show-...
2
votes
0answers
260 views

Protractor-Cucumber: PageObject [closed]

I have defined `loginpage.js': 'use strict'; ( function () { var ptor; var navigate = function () { //browser.ignoreSynchronization = true ; ptor = protractor.getInstance(); ptor....
2
votes
1answer
101 views

GUI Testing Angular SPA?

Developer here. Our QA team is researching new strategies for E2E testing for a new product. To start, it will be an Angular SPA, and eventually a PWA. They are leaning towards using Quantum / ...
2
votes
1answer
732 views

Selenium vs Protractor - how to choose [closed]

Selenium or Protractor? In what circumstances is Protractor a better tool for testing a web application than Selenium? I often see interview questions about Selenium, but Protractor seems to me to ...
2
votes
1answer
5k views

Using Protractor Cucumber JS: When running a test, the test passes when it shouldn't

I'm writing a test where I should log in. It passed given the proper inputs but when I change its password/username to garbage, it still passes. I'm new to this and I really think I missed something ...
1
vote
3answers
1k views

Are there any other frameworks other than Protractor for testing Angular web apps?

Protractor seems to be the buzzword these days for automating Web pages built with Angular JS. Are there any other frameworks other than Protractor specifically built for testing Angular web apps?
1
vote
2answers
6k views

Protractor - 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 ...
1
vote
3answers
2k views

Nesting callbacks with protractor

I'm using test framework protractor to test an angularjs app. I've been doing this for sometime now and one of the question that I've not been able to answer is : Suppose I want to modify a the value ...
1
vote
1answer
488 views

What is the meaning of test runner? What is the meaning of test runner in layman terms? [closed]

What is the meaning of test runner? Protractor is a test runner. What is the meaning of test runner in layman terms?
1
vote
2answers
2k views

How to tell protractor to wait for each command for 3 seconds

I am running angular e2e scripts. I am adding explicit wait for every element. Instead, is it possible to tell protractor to delay 3 seconds for every command?
1
vote
1answer
227 views

Writing different tests for different environments

We didn't implement automated deployment yet to our Angular 7 project, so environment-based variables (e.g baseUrl) are changed manually, causing the application to crash after deployment a lot due to ...
1
vote
1answer
2k views

How to find radio button value and ID with xpath

<rhr-radio-button element-id="tenderValidType" model="$ctrl.additionalData.procProcedure.tenderValidType" value="UNTIL_DATE" label="additionalData.tenderValidUntil" required="::$ctrl.requiredFields[...
1
vote
2answers
7k 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 ...
1
vote
3answers
13k 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 ...
1
vote
2answers
12k 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."...
1
vote
2answers
421 views

How to download files in folder other then the download folder using Protractor?

Using the following configuration, files are always saved in the download folder instead of the folder set for default_directory. 'capabilities': { 'browserName': 'chrome', 'chromeOptions': { ...
1
vote
2answers
1k views

Script timeout in Protractor

My current scenario is: the user types the username, password, and click on the login button. Then, the next screen shows a list box with Stores to login. Protractor loads this list box but it does ...
1
vote
1answer
271 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 ...
1
vote
2answers
1k 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
550 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 ...
1
vote
3answers
9k 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 ...
1
vote
1answer
861 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. ...
1
vote
1answer
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 ...
1
vote
1answer
788 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 ...
1
vote
1answer
2k 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 = ...
1
vote
1answer
2k views

How many 'it' can we define inside a describe block?

I am using Protractor for e2e testing. I want to know, How many 'it' we can define inside a 'describe block' in a test file like below- describe('This is my test suite',function(){ it('This is ...
1
vote
1answer
942 views

Handling unstable remote selenium server connection

We are currently running end-to-end tests on BrowserStack and tackle flakiness of tests on a daily basis. One of the recent problems was that rarely Protractor temporarily loses connection to the ...
1
vote
1answer
1k views

Verify baseUrl with prepended/appended text in protractor test

I'm using a baseUrl in the config file and some tests access links that have prepended/appended text to the same url that needs to be verified. How can I verify the clicked url while using the baseUrl?...
1
vote
2answers
99 views

Options for @findAll in protractor

I want to use two identifiers for the same element and use the first one found. With Java, we have @findAll. Is there any way to that with javascript protractor? Any function/options or something ...
1
vote
2answers
24k views

Handling DropDown using Protractor

I am facing issues with handling a trivial scenario during automation. I need to select a specific option using Protractor. I am passing the index of the option that I want to select, and then ...
1
vote
2answers
7k views

How to check if a file with random changing name is downloaded using protractor selenium? [closed]

This is the path of file capabilities: { 'browserName': 'chrome', 'chromeOptions': { prefs: { download: { 'prompt_for_download': ...
1
vote
1answer
2k views

How to count rows in GridView using webdriver c#, how to translate the existing protractor script to c# webdriver

I am trying to count the rows of the table and below is the HTML: I want to get the total count rows of the table, discarding table header and expanded row. I had tried the code below: var ...
1
vote
1answer
249 views

Hooks not getting executed in protractor cucumber

I new to protractor, and trying to implement hooks. But the hooks are not getting executed. Following is my code: Hook.js: const { Before } = require('cucumber'); const {AfterAll} = require('...
1
vote
1answer
40 views

Is there a way to write protractor tests to test on devices plugged into my pc not via browserstack

we are trying to save some money and have devices here already to test on, is there a way i can setup my tests to run on them ? Thank you in advance