Questions tagged [protractor]

1

votes
1

answer
597

Views

How to run Angular6 E2E tests on Alpine Linux

While trying to run E2E tests using Alpine Linux we have the following mysterious error: E/launcher - spawn (...)/selenium/chromedriver_2.40 ENOENT How to reproduce docker run -it --name my-alpine --rm alpine:latest /bin/ash apk add --update nodejs nodejs-npm chromium \ && export CHROME_BIN=/usr/bin...
hamilton.lima
1

votes
1

answer
33

Views

Protractor test suite run all tests that are not in a folder

It is possible to create a test suite in Protractor by adding the following to a config file: suites: { test1: 'folder1/**/*.spec.js', test2: 'folder2/**/*.spec.js' } Where the test suite test1 will run all tests that are inside folder1. How can I create a test suite that will run all tests that are...
sininen
6

votes
4

answer
1.4k

Views

Invalid or corrupt jar file when trying to start selenium server from intelliJ

I am trying to start my selenium server from intelliJ and it is saying the file is corrupt. I use intelliJ to run my protractor tests, and I start the selenium server from the intelliJ terminal before I run them. For whatever reason it is saying my jar file for selenium-server-standalone is coming b...
P Jones
-3

votes
3

answer
45

Views

I want to break loop

home_page.activityOnAgenda().then(function (items) { var len = items.length; for ( i = 0; i
Priya
1

votes
2

answer
26

Views

Should the Locators have awaits and is that causing flaky tests?

We're testing JS apps with protractor and sometimes we get some randomly unstable tests. Sometimes the errors are Failed: stale element reference: element is not attached to the page document Just a hunch but sometimes developers write the code like this await element(await by.css('.pager-next')).cl...
Tim
1

votes
1

answer
96

Views

Not sequential execution of JavaScript with Protractor tests

Whenever I try to run an automated test script written using JavaScript with Protractor, I can see that these two are actually ran in parallel independently of each other. Example: it('Validation of ND account', function() { // I logged in, and navigated to the page I need // And this is where is ge...
Sergey Pleshakov
1

votes
1

answer
27

Views

Store Parameters in place OTHER than config.js

I'm using parameters for some iterative E2E tests using Protractor/Jasmine. I've seen in other articles that parameters are normally stored in config.js. Now my parameters file is going to be big, BIG and I'd rather not have it as part of config.js. Can I use a separate file e.g. parameters.js? How...
David Redmayne
1

votes
2

answer
207

Views

Protractor test ngFor inside accordion

Am having a ul tag inside accordion. How to count the number of elements inside ul tag using protractor ? Also I need to fetch movie title inside ul tag. Can anyone suggest me how to achive this ? Sample HTML file: {{movie.title}} {{movie.vote_average}} {{movie.overview}} Recommend UnRecommend
mongoUser
1

votes
1

answer
296

Views

protractor hanging on element click

I've got an angular 5.x project. I'm trying to execute some e2e tests with Protractor. I've got a few simple tests running that simply check the browser title and check for the presence of basic elements. I'm now trying to do more complex tests where I interact with the page. Unfortunately clic...
BRass
1

votes
1

answer
71

Views

Jasmine HTML2 Reporter

I have been using Jasmine2-HTML-Reporter and it's been fine. Produces a multi-spec report with screenshots - just as I need. However, something seems to have gone awry! Now I will only get a report for the first Spec and nothing for any other spec. Also, the system used to delete the previous report...
David Redmayne
1

votes
0

answer
212

Views

Protractor Map or Filter function on a table which is having repeater with inside div elements

Below is the html for a table with repeater> div> a> span. How I can work with filter or Map function to get the compare the second column value i.e idea = ideaOne + ideaTwo + ideaThree + ideaFour along with first column value in loop as this is an anchor tag. Also what would be the proper way to d...
tyaga001
1

votes
1

answer
86

Views

Why is my method not waiting for the promise to resolve before returning?

I am attempting to build an array populated with Merchant names, each having an element ID. I check to see if the row has a value first since I don't know how many merchants will be in the list except that there will be fewer than 20. I want to return the array so I can sort it and perform other man...
M. Deem
1

votes
1

answer
20

Views

Assertion is not working in protractor-cucumber with Chai library

I am running a code for navigating to the dashboard from login page and clicking the logout button. browser.sleep(3000); expect(browser.getCurrentUrl()).to.eventually.equal(url); element(by.css('.frx-header-username span')).click(); element(by.css('.frx-menu-list-container .frx-menu-list')).click()...
Devleena
1

votes
0

answer
154

Views

Unable connect to page. Browserstack

I use protractor with Browserstack.exe for e2e (UI) testing. I have to check authorization proccess. It goes in this way: go to domain/#login redirect to auth0.com to get authorized (hosted auth0 authorization) enter credentials redirect to my angular client with finished authentification. I read th...
pavel
1

votes
1

answer
357

Views

How to send keyboard keys to nested input in ion-input using protractor

Hi I am having a problem trying to send keystrokes to an ion-input in an ionic application. I can successfully click the ion-input but when i try to send keys it says Failed: unknown error: cannot focus element I think protractor is binding to the ion-input and not the nested input element in the...
Daniel
1

votes
0

answer
224

Views

perform double click on an element in protractor-cucumber

syntax for double click on an element which is working in all browsers. I am using protractor version 5.2.2 and cucumber 3.2.0 I tried with below code.but it is not working for me var AddButton = element(by.css('.frx-memberlist-grid-container tr:nth-child(1) td:nth-child(1) span')); browser.actions(...
Devleena
1

votes
1

answer
662

Views

Not able to give date value to the date picker in protractor

I am using angular 4 with protractor 5.2.2 and cucumber 3.2.0 my HTML code is given below DOB : i am not able to give a date value by using element(by.css('.ngx-datepicker-container input')).sendKeys('08-02-1990'); but when i am try to click with this same element, the date picker popup will open....
Devleena
1

votes
0

answer
49

Views

How to test ionic application in production environment

I want to test my ionic application e2e in the production environment using protractor. The main challenge and that I am facing is that How to start seeting the protractor environment in production? Is is same as we set up in development? Secondly, If I ran my test suite in production will it buil...
Aditya
1

votes
2

answer
2k

Views

“Process exited with error code 1” This is the error message is displayed with code error : 1 when I run my below script

Failed: Error while waiting for Protractor to sync with the page: 'both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See...
Dixit_Autobot
1

votes
1

answer
34

Views

How to run a UI workflow for n times and get result in Jasmine it block and perform assertion

I have to execute a UI workflow using nodes-selenium webdriver n times and calculate the average timing and assert it in jasmine it block. I have tried several ways but can't figure out how this can be achieved in Jasmine it() block .
Rocky
1

votes
0

answer
122

Views

Do we really need a headless browser in running with bitbucket pipelines?

Do we need a headless browser for CI/CD using with bitbucket pipelines? Although I have used with both the options, with and without headless, and the test ran in both the scenarios. If its not true then why are we adviced to use a headless browser with CI/CD? Information: When using without headles...
Aditya
1

votes
2

answer
236

Views

Unable to find and click on the list element in protractor

The following is my code snippet. I am not able to find and click on the list element. First I search for a name and the search list is displayed from which I have to select a list element. *` Swati-testing Swati-dev `*` If I am using element.all, getting an error as element.all is not a function.
swati
1

votes
0

answer
258

Views

Protractor- cucumber javascript- pass variable values between steps

Following are my steps: Then(/^I clear default folder name$/, function () { var d = new Date(); var n = d.getTime(); // var folderName= 'Drawings'+Math.random()+'\n'; var folderName= 'Drawings'+n+'\n'; var row = element.all(by.repeater('node in nodes.selectedNode.children track by node._id')...
Saagar
1

votes
1

answer
418

Views

How to use Postman native client to capture API requests during Protractor test execution

I've built out an extensive end-to-end test suite for our application using Protractor and I'm now setting my focus on our back end API which doesn't have any documentation or automated tests. My goal is to capture API calls made during my protractor execution using postman's native Windows client....
Chris Traynor
1

votes
1

answer
719

Views

Run protractor e2e tests from Visual Studio Team Services

I'm having trouble trying to run Protractor e2e tests from VSTS within a release definition. Steps I have in my release definition are: Azure File Copy: This copies the source code from a Git repo to an Azure VM that will run the tests PowerShell on Target Machines: This executes a Powershell scrip...
Matthew
1

votes
1

answer
359

Views

Unable to pass Windows Security authorization popup (protractor)

I got stuck with authorization in IE. In my case: I have adfs authorization, which redirect me from my site to adfs, then to my site again redirect me back. I tried this way: browser.switchTo().alert().sendKeys('Text'); But this works only for first input field. For the second input field: browser.s...
Goncharr
1

votes
2

answer
472

Views

Protractor: Store ElementArrayFinder getTexts in Array and return array from method

I have a situation in protractor where I want to store ElementArrayFinder getTexts in Array and return array from method. I have written the method so far like this: static getAllTexts(elements: ElementArrayFinder) { const data: string[] = []; elements.each(function(elem) { elem.getText().then(funct...
Sitam Jana
1

votes
1

answer
491

Views

e2e protractor test can't detect angular component in multi layer angular router

I have an angular application, i need to implement e2e test in this project. angular pack: 4.6.6 protractor: 5.3.0 Also i have a multi-layer router in my project, that wrap the router-outlet int o an other component in each layer. When i need to navigate to one of the low-layer routes for example /n...
Mohammad Raha
1

votes
1

answer
506

Views

PROTRACTOR - Failed: element.all is not a function

I have a problem to use the element.all function. My guess is, that it has problems with an id. I know an id should be used one time only, but I am testing the software only and have no possibility to change this id to a class. So maybe there is a solution to get it with element.all and then process...
Felix Lueth
1

votes
0

answer
34

Views

Trying to post protractor test results into database

We are wanting to post the protractor test results to a database table and I have not been able to figure out how to get it to work. I am trying to use a custom jasmine reporter, but even though I have added the following to the jasmine custom reporter a record isn't written to the database. var CC...
Christine Edwards
1

votes
1

answer
229

Views

Protractor starts Firefox(with profile) but doesn't respond/run any of the code

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 in my conf.js everytime I call a new instance of firefox. Problem is FF starts and does not execute...
Gencho Kerkeniakov
1

votes
1

answer
153

Views

Handle dynamic text in feature file with cucumber-protractor frame work

I am using protractor-cucumber frame work with protractor 52.2 and cucumber 3.2.1.My feature file having 2 scenarios.In first scenario, i have to create a task which having unique name. In second scenario,i have to search the newly created task by its name(i have to use the newly created task name i...
Devleena
1

votes
3

answer
85

Views

Protractor Framework setup

While setting up protractor, encountered following error while trying to start webdriver manager : C:\ang\Angular_modules\node_modules>webdriver-manager start [05:55:09] I/start - java -Dwebdriver.chrome.driver=\\usatlkilne01-ctxcifs\ctxprofiles\FolderRedirW10\ajoshi056\AppData\Roaming\npm\node_modu...
Ash
1

votes
1

answer
49

Views

Random ECONREFUSED from webdriver / chrome

We have written a bunch of e2e tests for an angular4 app, that we are developing. The problem is that I am getting random ECONNREFUSED message from webdriver / chrome, when running automated tests with protractor. - Failed: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:54657 Protractor is running with...
TBowmo
1

votes
1

answer
106

Views

Protractor test fails with config not defined

I have simple Protractor test that runs fine on my local system, but crashes with the error config not defined when I run it as a part of the deploy pipeline in CodeShip. Since the error is happening as a part of the browser, I haven't got any useful stack trace either. Will be helpful if someone ha...
Sankha Narayan Guria
1

votes
0

answer
208

Views

Adding video in Allure Report using Allure jenkins plugin

I was trying various ways to embed a test run video in Allure Report plugin with Protractor. we can do it if we add a video Folder inside the Allure Report folder and add the video path in the allure description . So then Allure displays and play the video in description part. However, i wanted to a...
anuvrat singh
1

votes
0

answer
201

Views

Running e2e tests w/ Protractor fails when a call to my API is made

I'm trying to run e2e tests on my Angular 4 app which hits my ExpressJS backend API. Running ng serve my app is served up by default on port 4200. And then separately running nodemon server.js starts my ExpressJS server on port 3000. I can use. With app.use(cors({ origin: 'http://localhost:4200', cr...
gh0st
1

votes
2

answer
217

Views

Protractor can't find button with $ctrl on ng-click

I cannot find buttons that have this $ctrl part with protractor. Example of a button: Add virtual AP The reasonable solution seems to be to search with ng-click: addVAPButton = element(by.css('[ng-click='$ctrl.openProfileModal()']')) But it does not work. I've tried it with various comma combination...
E SV
1

votes
1

answer
94

Views

pass parameter as webelement to make global method 'click'

How to pass parameter as WebElement in protractor with TypeScript? for example: public click(element:element){element.click();} it's doesn't work... '[ts] Property 'click' does not exist on type 'Element''
Jacob
1

votes
0

answer
113

Views

testing a site not working in internet explorer-values not able to enter in fields

I am using protractor version 5.2.2 and cucumber-protractor framework, I have started practising testing for the LinkedIn site, but when I use the internet explorer browser it is only able to open the LinkedIn URL as mentioned in the config file and no scenarios are being executed, can anybody help...
Snake eyes

View additional questions