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
16
votes
4answers
15k 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 ...
12
votes
8answers
49k views

Why can't we use Selenium Webdriver to test Angular JS sites?

If we look at the Protractor architecture, Protractor uses WebDriver JS to call Selenium Webdriver which ultimately calls browser driver and then browser. Now since Selenium is passing commands to ...
10
votes
3answers
11k views

Why should we use javascript for UI test automation?

Background:JavaScript based automation frameworks heavily depends on asynchronous execution, promises, callbacks, anonymous functions, etc which are inherently complex and probably an overkill for a ...
8
votes
3answers
819 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 ...
8
votes
2answers
837 views

Canonical way for multi-session browser testing in Protractor

The Question: What is the canonical way to write multi browser window tests in Protractor - the tests that involve multiple sessions fired up interacting with one another? The Story: The main ...
7
votes
3answers
5k views

Cypress vs Protractor for end-to-end testing

I've recently stumbled upon a modern end-to-end testing framework called Cypress which is going to be released in public beta this year. It really looks awesome at the first glance - there are ...
7
votes
2answers
5k views

Organizing and maintaining protractor test files within multiple suites

I am just getting started with Protractor and inherited roughly 40 automated test cases. They are currently meant to run sequentially and are not organized or built to run independently. I am taking a ...
7
votes
4answers
1k views

Cucumber + Protractor : What will be good practices to maintain test data in separate file?

I am looking to see if this is possible... I am writing UI tests for web and mobile in Cucumber (using Protractor for web and Appium for mobile) and would like to store login details (email and ...
6
votes
2answers
1k views

Switching from JavaScript to TypeScript for Protractor e2e tests

Not very long time ago, Protractor itself migrated to TypeScript internally. I've also heard and seen several Protractor test projects moving to TypeScript. We have a rather big and growing test ...
6
votes
1answer
326 views

Exception thrown: Keeping the Selenium server alive

I am doing protractor test, and I am using ExpectedConditions as below. var EC = protractor.ExpectedConditions; var el = element(by.css('[class="loader-class ng-scope"]')); browser.wait(EC.not(EC....
6
votes
1answer
140 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 ...
5
votes
3answers
194 views

Is it a good idea for a Developer to review a tester's code

Background : Currently working in a firm which follows a practice where the QA's e2e and API automation suites are mandated to be reviewed before being pushed in a CI pipeline. It's a practice that is ...
5
votes
2answers
2k views

Speeding up end-to-end tests

When we execute the same set of end-to-end browser-automated tests on BrowserStack, we notice a dramatic slowdown - tests are much slower than if executed locally and there are occasional failures ...
5
votes
6answers
230 views

How can a beginner develop an automated testing framework completely from scratch?

I am completely into manual testing, I was asked by my manager to start developing an automated framework for my company website and mobile application. I am a complete beginner and have a very little ...
5
votes
2answers
684 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 ...
5
votes
2answers
772 views

Using SuperTest/Protractor on unsecure HTTPS

I am trying to run automated API tests on localhost with an invalid cert. Is there a chromeOption equivalent to "Proceed Anyway" that I can pass to the tests so they can get a response from the url? ...
5
votes
1answer
4k views

How to Run e2e tests on multiple browsers in series?

I am running e2e tests using Protractor on a VM through azure. I want to run tests on multiple browsers, which Protractor allows me to do by adding a list like this (from the protractor.config file): ...
5
votes
2answers
1k views

Associate Protractor tests to TFS properly

I'm trying to write a few tests in Protractor, but looking a bit forward I wonder if anyone knows how to fully associate my Protractor tests to my test cases in TFS. So, I can run it those tests from ...
5
votes
2answers
4k 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. ...
4
votes
4answers
11k views

How should I find the XPath using selenium webdriver and protractor

I'm a beginner in automation testing. I'm trying to select a value from data list and I got an XPath like mentioned below: XPath : html/body/div[2]/div[1]/div/div[1] This is the HTML for the same :...
4
votes
2answers
286 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 ...
4
votes
3answers
298 views

How to profile end-to-end tests to find the slow ones?

The Story We have a big end-to-end test codebase written in Protractor/WebDriverJS. We are using jasmine-spec-reporter for the command-line test reports. It reports test execution time for every ...
4
votes
2answers
12k 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 ...
4
votes
2answers
3k views

How to clear a directory before running Protractor tests

I have a Protractor test to validate that an excel file is correctly downloaded in the Downloads folder and then I am able to upload the same. Since I will be running the test multiple times, I need a ...
4
votes
1answer
76 views

Creating a RTM doc using Protractor Tests

I would like suggestions for how people create RTM documents when creating automated test cases using Protractor/Jasmine. We have our suites set up based on logical sections of the application, not by ...
4
votes
2answers
167 views

How to structure automated tests for feature with two dashboards?

I'm going to prepare e2e tests for chat app with two customer dashboards. First (written in Angular) is accessible from desktop browsers and second (Ionic) through mobile devices. When customer ...
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 ...
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 ...
3
votes
3answers
397 views

Looking for protractor resources, wanting to get into this automation tool

A lot of surrounding companies are adopting a testing framework called Protractor, I am wondering if anyone has any advice on where to get started with this automation tool.
3
votes
3answers
9k views

How to handle windows authentication pop up with Protractor?

Use case: When URL loads, it request for Windows authentication (Enter Username and Password). How it goes is: loads the url on clicking Post button in the page. Windows Authentication pops up ...
3
votes
2answers
1k views

Locate an element by uib-tooltip in protractor?

I'm having issues locating 'events' on our platform. Each time an event is created, a div card is added to the page at the end of the events. Ideally I'd like to run tests in parallel so picking up ...
3
votes
1answer
1k views

Separate configurations for different environments on protractor

For example local, qa, and production. Each of them has different URL. So I expect to contain something in URL. So I need to take some parameter from console where I run the protractor. I run ...
3
votes
2answers
6k views

Switching windows with non angular pages using Webdriver JS

I have a non angular page that I open and then click a link, which changes pages and I fill out a form with some information and then click a button. Upon clicking that button another browser window ...
3
votes
1answer
995 views

How to debug events not firing after clicking continue button?

I have an automated script that fills out guest information and clicks a 'Save and Continue' button to proceed to the next page. The button is being clicked correctly because it becomes disabled but ...
3
votes
1answer
399 views

Using Functional programming for UI Test automation

From what I have read about functional programming, it is considered to be more concise, more testable, and have fewer side effects. Would it be good to use for UI test automation? Context: I am ...
3
votes
1answer
543 views

WebDriver Error Cannot use 'in' operator to search for 'String' in false

I have been using selenium webdriver with protractor for more than a year now and recently after updating to the newest versions i got an error that i have never encountered before. As stated in the ...
3
votes
1answer
427 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 ...
3
votes
1answer
3k 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 ...
3
votes
1answer
1k 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....
3
votes
1answer
720 views

Scheduling time interval : Protractor

I have written some E2E testcases using protractor, selenium-server and angularjs, now I want to run the same testcases(with or without any change) again and again by setting some time interval for ...
3
votes
2answers
629 views

ChromeDriver : driver failed to parse value of getElementRegion - understanding the error

The chrome on my office Mac machine recently updated to 76+. Since then one of the tests, written in Protractor and CucumberJS, started failing citing this error - WebDriverError: unknown error: ...
3
votes
2answers
286 views

Protractor Image didnt upload on dialogue 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 ...
3
votes
1answer
425 views

ElementArrayFinder.filter() - how does it work under the hood?

In my UI, I have a project tree that contains a list of components that are in a project. Once my current spec is done running I'm calling a page object function to delete all the components to clean ...
3
votes
2answers
99 views

how can i modify html report so that i can print passed and failed test case name in html report in jasmine framework?

i want to print custom message with passed passed, Thanks in advance
3
votes
1answer
814 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 ...
3
votes
2answers
9k views

How to check if a file is downloaded using protractor selenium?

This is the path capabilities: { 'browserName': 'chrome', 'chromeOptions': { prefs: { download: { 'prompt_for_download': false, ...
3
votes
0answers
154 views

Is there a way to stop GridLauncher opening during testing on Mac?

Since moving from a Linux VM to a Macbook Pro for testing, I have been having a recurring issue running Protractor automation. At a certain point in my suite all, a Java application called ...
2
votes
2answers
193 views

Creating negative automation test scripts

When creating a negative automation test script, should this be separated from my positive script, or can I also include the negative scenario in my script. I am using protractor for this. Thanks
2
votes
6answers
3k views

Coded UI vs Protractor

I just joined a new company who doesn't work with any kind of automated tests. I have been hired to start test automation, and looking around I found two interesting options to e2e tests, Protractor ...
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 ...