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
19
votes
4answers
21k 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 ...
14
votes
8answers
58k 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
13k 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 ...
10
votes
2answers
356 views

Data driven testing using csv in Protractor

I am trying to run data-driven testing using csv file in protractor : I have created a read csv promise module: let readSync = async function (path1) { console.log(path1) const csv = require('csv-...
8
votes
3answers
6k 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 ...
8
votes
3answers
1k 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
1k 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
2answers
6k 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
2k 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
352 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
169 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
222 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
3k 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
238 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
718 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
1k 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
7k 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. ...
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 ...
4
votes
4answers
13k 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
318 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
388 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
14k 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
5k 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
2answers
154 views

How to wait for gettext not to be empty for an element

I want to make sure the getText returns a non-empty string before continuing the program flow. I have tried : var EC = protractor.ExpectedConditions; await browser.wait(EC.not(EC....
4
votes
2answers
377 views

How to restart browser in protractor-cucumber framework or protractor-jasmine

I am using protractor-cucumber-framework, but when I try to restart I get This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and may no longer be used. I ...
4
votes
2answers
187 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 ...
4
votes
2answers
13k 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, ...
4
votes
1answer
81 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
79 views

Run multiple protractor scripts in one action?

I have my protractor scripts running. But on my current scenario, to run the tests it is needed to run each .js individually. I want to pack all the test files into one or pack all the test files into ...
4
votes
1answer
49 views

Protractor console logs when run with directConnect:True

When the config file is executed with directConnect:True flag, I am getting console logs that show more errors about my angular application. When directconnect flag is removed, there are no warning ...
4
votes
0answers
74 views

How expected condition 'Isclickable' works in protractor

I am trying to click the below button element: <button _ngcontent-xjt-c6="" class="ef-ui-btn-inline-sm ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only" ...
4
votes
0answers
163 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 ...
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
3k 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
1answer
355 views

How to interact with ngx-monaco-editor

I have a web page that has the ngx-monaco-editor implemented in angular. But i am not able send any data to the editor using sendKeys() . I tried replacing textContent of the div element but it just ...
3
votes
1answer
2k 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 ...
3
votes
3answers
415 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
1answer
200 views

How to open Edge browser in protractor for edgeHTML version 18

I tried all the solutions that are mentioned, but I am not able to get Microsoft Edge (HTML version 18) in Windows 10. I downloaded the web driver using the below command on my personal PC and copied ...
3
votes
3answers
11k 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
2k 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
242 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 --...
3
votes
1answer
1k 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
496 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
561 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
448 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
56 views

How draw a straight line in canvas using protractor

Context: I want to test a signature canvas field So i want to draw a signature and then validate that signature is displayed on the canvas. Right now i cannot even draw a proper line , so wanted to ...

1
2 3 4 5