Questions tagged [protractor]

Protractor, a top-tier test framework developed on WebDriverJs technology, is specifically designed for Angular and AngularJS applications. With the ability to function as both a standalone binary runner or an integrated library in your tests, Protractor offers flexibility and control over managing WebDriver and customizing your testing setup. For detailed information, visit http://www.protractortest.org/#/ and explore the official repository at https://github.com/angular/protractor/.

Protractor synchronization with the page exceeded the time limit of 50001ms and timed out

I am currently testing an AngularJS application and I am relatively new to using protractor. Whenever I open the browser, it opens successfully but then waits for a timeout before displaying the following error in the command prompt. Protractor synchron ...

Personalized Jasmine matchers for a Protractor/WebDriverJS component

Greetings fellow developers, I'm looking to create a custom matcher for Protractor/WebDriverJS element. Can anyone assist in improving my current code? Here is what I aim to include in the specs files: var button = element(by.tagName('button&a ...

Protractor: Navigating two drop down menus simultaneously on a webpage, able to choose option from only one dropdown menu at a time

Currently, I am using Protractor to execute an automated script. On one of the pages, there are two drop down menus positioned above and below each other. The interesting thing is that both drop down menus appear to be identical except for their different ...

What is the process for generating an alert box with protractor?

While conducting tests, I am attempting to trigger an alert pop-up box when transitioning my environment from testing to production while running scripts in Protractor. Can someone assist me with this? ...

Error message: Unable to save metadata in the protractor-screenshot-reporter plugin

Hey there! I have decided to organize my protractor specs into multiple files and folders for better manageability. I am also looking forward to the suites config option being implemented. I am using a reporting tool for protractor () and encountering the ...

When utilizing $resource, Protractor experiences a timeout while trying to synchronize with the page

Currently, I am testing Protractor with a small AngularJS application. Here is the test scenario: describe('Testing Protractor', function() { var draftList; it('should count the number of drafts', function() { browser.get('#/'); draftList = ...

Protractor unexpectedly giving back a promise instead of the expected attribute value

I'm facing a challenge where I am attempting to extract the value of an HTML attribute and store it in a variable named url_extension. However, instead of getting the desired value, I keep receiving a Promise object. Below is my code snippet: (Please ...

"Encountered the error message "Self-signed certificate in certificate chain" while attempting to run the command 'node-gyp configure'

Encountered an error while attempting to build the Microsoft driver for Node.js for SQL Server gyp info it worked if it ends with ok gyp info using [email protected] gyp info using [email protected] | win32 | x64 gyp http GET https://nodejs ...

What could be causing the sluggish performance of my protractor test cases?

I'm a beginner with Protractor. Utilizing Protractor and Jasmine for end-to-end automation testing on an Angular4 application. Noticed that when running a specific suite, it performs quickly. However, running all suites takes considerably longer to finis ...

Using Protractor to extract text from multiple paragraphs

How do I retrieve the values of all paragraphs (p) at once? Below is an example of how my inspect view appears: "Testing sample one." "Testing sample two." And here is a snippet of my code to extract the value of id 'run': browser.findElement(by.css('[ ...

Error in Protractor/Selenium Webdriver: The runtime execution context has an invalid 'context'

While testing my Angular2 app using Protractor, everything was functioning properly without any changes in the configuration. However, I now encounter the following error: ... super(opt_error); ^ SessionNotCreatedError: session not created exception ...

The function waitForAngularEnabled does not exist

Currently, I am conducting end-to-end tests for an Angular application. For the login process, it needs to exit the app, so here is what I am doing: browser.waitForAngularEnabled(false); //login browser.waitForAngularEnabled(true); While this approac ...

Running multiple instances of Chrome to execute all scenarios sequentially within a single feature file in Protractor

I need to run all scenarios in multiple instances of a browser. I've set the maximum instance value in capabilities, but only one instance of Chrome opens and the tests run sequentially. How can I ensure that the tests run in multiple instances simult ...

The JsonFormatter is throwing an error because it is trying to access the property 'on' of an undefined variable

I have encountered an error while attempting to generate an HTML report using cucumber-html-reporter The error message is: Unhandled rejection TypeError: Cannot read property 'on' of undefined at new JsonFormatter (C:path-to-project ode_modulescucumbe ...

Look for a specific element on the page and choose the "Next" option if the element

In my dynamic table, I have various links and I need to search for a specific link. this.table.element(by.cssContainingText('a','1616050')); If the link is not found on the current page, I want to click on the 'Next 30 records' button to load more data. ...

Guide to extracting the outcomes of a promise array and populating them into a new array using Protractor

I am facing a challenge with transferring data from an array of promises generated by the following code: element.all(by.repeater('unit in units')). It seems to be difficult for me to store this data into another array: element.all(by.repeater('unit in ...

`Evaluating the functionalities of AngularJS using Protractor`

Currently, I'm in the process of developing an AngularJS app and have been tasked with incorporating automated testing into our workflow. This is a new concept for me, so it's taking some time to fully grasp. After much consideration, I've opted to utiliz ...

Ways to extract text from a temporary element

Here is my HTML code: <div class="p-login-info" ng-show="loggedOut()">My text.</div> This is the corresponding JavaScript code: var e = element(by.className('p-login-info')); e.getText() .then(function(text){ var logoutText = ...

[Protractor][Scroll] I need assistance with scrolling my webpage using a while loop. Could someone please help me troubleshoot the code?

When this function is called, it initiates scrolling and then pauses the browser for a 2-second period. scrollToElement(webElement: any) { browser.executeScript('window.scrollTo(0,400);').then(()=>{ console.log("sleeping"+ browse ...

Navigating Spinners in Protractor: A step-by-step guide

When I'm working on my AngularJS application, I've noticed that when a page loads, two things happen concurrently: the content of the page loads and back-end resources start loading. A spinner appears while the back-end resources are still loadin ...

What is the best way to retrieve all "a" elements with the "title" attribute from a list item?

How can I retrieve the Title values of all the a tags? Below is the XML structure with a ulTopMenu that acts as a hover dropdown, and I am using Protractor. <ul id="ulTopMenu"> <li> <li> <li> <ul class="submenu"> ...

Guide to installing and utilizing headless chrome binary within a Jenkins (Linux) environment

Struggling with the lack of a clear plan on how to proceed, here is the situation at hand: I currently have a Protractor test suite running headless using Chrome 60 (beta) binary by specifying the binary location in Chrome options in a Windows environment ...

Is there a dependable resource for mastering Protractor along with the Jasmine Framework in Eclipse using JavaScript?

Starting a new role at my organization where I will be testing Angular JS applications. Can anyone recommend a good website for learning PROTRACTOR with JAVASCRIPT using the JASMINE Framework? (Would prefer if it includes guidance on Eclipse IDE) Thank yo ...

Protractor fails to capture the presence of mat-dialog-container

My Protractor test for an Angular 5 application is functioning well, except when it has to handle a popup containing input fields. The HTML element representing the popup looks like this: <mat-dialog-container class="mat-dialog-container ng-tns-c26-5 n ...

Execute protractor, selenium, and Python unit test in sequence

I have a set of Protractor Selenium tests and another set using Python unit test. Both sets are independent of each other. I want to run a Protractor test first, and if it passes, then run a Python test. If the Python test also passes, I want to run the Pr ...

Creating custom ExpectedConditions with Protractor for detecting attribute changes

I've been working on creating a custom ExpectedConditions method that can wait for an element attribute to change. Here is the approach I came up with: const CustomExpectedCondition = function() { /** * Check if element's attribute matches the provi ...

How can I verify in protractor whether a table cell contains specific text?

Currently, I am debugging an end-to-end test using Selenium Webdriver Manager version 12.1.7 with Protractor 5.4.3. I am attempting to verify the presence of a table cell on my page that contains specific text. The code snippet I'm using is as follows ...

Make sure to select the checkbox using a protractor only if it hasn't been checked already

I am attempting to retrieve a list of checkboxes using CSS and only click on a checkbox if it is not already selected. I have successfully obtained the list, but I am encountering an issue when trying to validate whether or not the element is selected. Ca ...

Error: The AWS Lambda handler is throwing a TypeError, indicating that the callback must be a function

I clicked on the link: How Can I create an AWS Lambda Script for Running a Protractor / Selenium Browser Automation Script? Instead of implementing my own code, I used the following code snippet in the handler section based on the provided answer: 'use str ...

Issue with Angular detection on the webpage: Protractor and headless chrome unable to locate Angular

Running end-to-end tests on my Angular2 app using Chrome works perfectly fine. However, when attempting to use headless Chrome with additional chromeOptions, it fails to locate the Angular app. I have tried setting directConnect to true and starting the se ...

When it comes to E2E testing with an Angular, Python, and MongoDB web stack, which tool is more effective: Selenium or Protractor?

Just discovered the protractor framework, which offers end-to-end testing for Angular applications. I'm curious to know which test framework is more suitable for the webstack I am using - Angular, Python, and MongoDB. Should I go with Selenium or Protract ...

Different ways to turn off animations in Protractor for AngularJS applications

Is there a method to disable animations within an AngularJS application when running Protractor tests? I attempted to incorporate the code below into my protractor.config.js file, but it did not have the desired effect: var disableNgAnimate = function() ...

When utilizing the JHipster DevBox, npm does not generate a symbolic link for the webdriver-manager

At my workplace, I am attempting to integrate JHipster with the DevBox using a proxy. Despite configuring everything correctly, I am encountering issues in utilizing JHipster effectively. My goal is to create a microservice gateway with Protractor, but wh ...

Leveraging the outcome of an API request with Protractor

I have developed a small API that generates test data instantly. Each request creates a new user and provides the relevant data. For fetching the data, I utilize the 'request' package: var flow = protractor.promise.controlFlow(); var result = f ...

Difficulty encountered while executing Protractor tests with Selenium Server

Attempting to Execute Protractor/Jasmine/Selenium End-to-End Tests Currently in the process of running end-to-end tests using Protractor with the standalone Selenium server and the chrome driver. Encountering a Selenium server error when attempting to ru ...

Challenges encountered while setting up Protractor on MAC OS version 10.6

Do you need assistance with this installation? $ npm i protractor -g | > [email protected] install /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate > node-gyp rebuild child_process ...

Protractor is able to achieve successful test results without actually executing the tests

SYMPTOMS When running Protractor, the tests pass successfully, but the pages do not load. Instead, they appear blank with "data:text/html" in the address bar (refer to the screenshot). Although the tests show as passed, there are 0 assertions being made. ...

Using the MoveToElement and click functions in Protractor with Node.js for automated browser

Trying to click on a checkbox in our application. I have successfully implemented it in Selenium Java using the code below, but struggling to do the same in Protractor Node.js. Any assistance would be appreciated. Selenium- Java : Actions actions ...

Struggling to troubleshoot issues with asynchronous tasks in Angular? Encountering timeouts while waiting for elements on an Angular page? Learn

Edit: I have identified the source of my issue with guidance from @ernst-zwingli. If you are facing a similar error, one of his suggested solutions might be beneficial to you. My problem stems from a known Protractor issue itself. For those who suspect the ...

Protactor has been successfully integrated with Pdf2json, allowing for seamless

Is there anyone out there who has successfully integrated the pdf2json npm package with Protractor? I have managed to develop a standalone node application that can convert PDF files to JSON format. My next goal is to incorporate pdf2json into my protract ...

Having trouble running Selenium through Protractor on Firefox following the Angular 2 update

Following the upgrade from Angular JS 1.4.x to Angular 2, encountering issues running Selenium tests through grunt-protractor-runner on Firefox. Once AngularJS is loaded, an unexpected error pops up: D:\...\node_modules\grunt-protractor-ru ...

Having trouble clicking on a button with Protractor because the button text is located within a child span element

Having trouble clicking a button with protractor. The DOM structure is displayed in the image above. Here are some of the locators I've attempted to use: element(by.xpath("(//div[@class='mat-drawer-backdrop ng-star-inserted'])//a following-sibling::mat- ...

Am I effectively implementing async await in TypeScript?

I'm not quite sure if I'm using the async/await functionality correctly in my TypeScript and Protractor code. Looking at the code snippet below, the spec uses await to call the page object, which itself is an async/await function. The page object then call ...

The issue of using an import statement outside a module arises when executing Protractor

I am facing an issue while running Protractor with my two files. When I execute the command "protractor protractor.config.js", I encounter the following error: D:\work\staru-app>protractor protractor.config.js [16:57:17] I/launcher - Running ...

Issues with Firefox Protractor testing functionality

Trying to test a protractor on an angularjs application using Firefox 47 has been unsuccessful. Attempted downgrading to version 46.0.1 after researching on Stack Overflow, but still facing issues. Has anyone discovered a working solution for this? It seem ...

Running Protractor tests can be frustratingly sluggish and frequently result in timeouts

After spending most of the afternoon struggling with this test, I've tried different approaches but none seem to work. The task at hand is searching for users within the company, generating a table, and selecting the user that matches the name. Curren ...

Warning message about unhandled promise rejection in Protractor async/await causes UnhandledPromiseRejectionWarning

Currently in the process of updating my protractor tests to use async/await (Link). The migration has been going smoothly until I encountered a recurring issue. Here are the steps of my test along with an example code snippet illustrating the problem: G ...

Execute numerous tests simultaneously on diverse web browsers using Protractor

I have been researching how to set up this process, but so far I haven't found much information. It seems like a simple idea, so I'm confident there must be a solution out there somewhere. I am familiar with running Protractor on different brows ...

Configuration error with MultiCapabilities

Encountering an issue while utilizing multiCapabilities with two web browsers (Firefox and Chrome). Below is a snippet from my configuration: exports.config = { allScriptsTimeout: 11000, seleniumAddress: 'http://localhost:4444/wd/hub', baseUrl: 'h ...

Enhance your file uploading capabilities with Protractor and dropzonejs

I'm new to using protractor and I have a project that involves testing with Angular and dropzonejs for file uploads. Although I've come across some information on how to upload files with protractor, I am struggling to figure out how to do so wit ...

Unable to install protractor using npm due to an error

Encountering an error while trying to install protractor: C:UsersandreirAppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriver ode_modulesws ode_modulesutf-8-validate>node "C:Program Files odejs ode_modules pmin ode-g ...

Steps for clearing input field with type=date in Protractor:

I am currently working with protractor version 4.0.4 and I'm encountering an issue where I cannot clear a date input field. It seems like Chrome is introducing some extra controls that are causing interference. You can find further details about Chrome's ...

Tips for identifying changes in APIs during the simulation of end-to-end tests?

I am seeking to establish a strong e2e testing framework for our team's project, but I am struggling to find a straightforward solution to the following question: When all calls are mocked, how can we effectively detect if the actual model of the objects ...

Angular Protractor testing: achieving precise column name matching

I am new to writing protractor tests and currently navigating my way through it. The angular code I am trying to test looks like this: <tr ng-repeat="identifier in contentIdentifiers"> <td>{{identifier.contentIdentifier}}</td> & ...

Tips for using Selenium and Javascript executor to search through the Canvas system?

Is it possible to automate interaction with a 'graph' created on a canvas? I need to be able to click on elements, drag them, and perform other actions like getting text. Can this be achieved with automation using Selenium and JavaScript executor? Any he ...

Is the async pipe the best choice for handling Observables in a polling scenario

The situation at hand: I currently have a service that continuously polls a specific URL every 2 seconds: export class FooDataService { ... public provideFooData() { const interval = Observable.interval(2000).startWith(0); return interval ...

What is the process for running selenium-webdriver/protractor commands interactively within the command line of Chrome DevTools?

Guide on: creating a test without completion placing a breakpoint at the conclusion of the unfinished test navigating to repl / command line / chrome devtools running Selenium commands in repl / command line / chrome devtools ...

Unable to transfer variable from a function to the test in Protractor

Currently, I am working on a test to verify the amount of gold in my possession. The test is being conducted using TypeScript and Protractor. Within this testing scenario, I have a method named GetAmountOfChips: public static GetAmountOfChips(): PromiseL ...

Having difficulty running tests on Safari - Is a developer certificate necessary?

I have been attempting to run my protractor tests on Safari without success. After researching, I discovered that there is no need to download anything specific for Safari when using protractor as the driver comes with it. However, when trying to execute m ...

Dealing with inconsistent wait problems in Angular applications with Protractor and Jasmine

In my current project, I am using Angular for building the application along with Protractor and Jasmine for e2e tests. However, we have been experiencing inconsistent test script failures during execution. To tackle this issue, we tried setting ignore.s ...

Typing in Text within Kendo Textbox using Protractor

I'm encountering an issue with Protractor while trying to input text into a Kendo TextBox. The error message I receive is "ElementNotVisibleError: element not visible". Interestingly, when the text box is clicked on, the "style="display: none;" changes to ...

The driver instance that has forked will never cease

Issues arise when attempting to run multiple browser windows in Protractor. The code snippet being tested is as follows: I create a new browser instance to perform certain tests. When input is entered into the original browser, it should not affect the ne ...

Compel the browser to launch a fresh tab

I'm currently working on an app that involves uploading files. One issue I'm facing is that the file system pop up doesn't close after the upload, causing a quarter of the screen to be covered while the test keeps running in the background. I thought a pos ...

End-to-end testing with Protractor using multiple capabilities: Running Internet Explorer at the same time

Currently, I have Protractor 5 set up in the configuration file with multiCapabilities for testing my AngularJS 1.6 application. The idea is to have two instances of the same browser running simultaneously, simulating interactions between two users. While ...

Ensuring the presence of a bootstrap angular alert with protractor and cucumberJS

I am currently utilizing protractor, cucumberJS, and chai-as-promised for testing. There is a message (bootstrap alert of angularJS) that displays in the DOM when a specific button is clicked. This message disappears from the DOM after 6000 milliseconds. ...

Angular4 ChromeDriver Selenium Protractor

I am facing an issue while trying to run 'ng e2e'. The error message I encounter is as follows: WebDriverError: unknown error: cannot find Chrome binary I am using Protractor which is pre-installed with Angular CLI. Despite reinstalling ChromeDriver and ...

The clickable element is unresponsive in Protractor

Has anyone encountered difficulties interacting with elements in a modal popup? My current setup includes ChromeDriver 2.46, and all my tests involving modal popups are failing on Chrome 74. I keep encountering the following error message: The element is ...

What is the best way to utilize Protractor to comb through a specific class, locate a p tag within that class, and validate certain text within it?

My current task involves using Protractor to locate a specific class and then search through all the p tags within that class to identify any containing the text "Glennville, GA". In my spec file, I have attempted the following steps: it('should filter r ...

Accessing a document using protractor

It seems like every protractor example I come across online uses browser.get with a web URI. browser.get('http://localhost:8000'); I want to use Selenium to navigate to a local file:// path without needing a web server running. Just a simple HTML page an ...

Protractor experiencing difficulty recognizing Angular functionality

Recently, I made the switch to using Protractor for running end-to-end tests on my Angular application. However, the e2e tests have suddenly started failing because Protractor is unable to detect Angular on the website. I raised this issue in their GitHub ...

Tips on waiting for an event to be processed during a Protractor end-to-end test

I have a straightforward AngularJs 1.4.8 Front-End: https://i.stack.imgur.com/2H3In.png After filling out the form and clicking the OK button, a new person is added to the table. The form resides in the addingPersonController, while the table is control ...

Steps to retrieve values from a grid and execute a sum operation using PROTRACTOR

Embarking on my Protractor and Javascript journey, I am faced with the challenge of writing a test script to retrieve values of various accounts under the header "Revenue" (as shown in the image below). My task involves extracting all number values listed ...

Tips for selecting CSS selectors in Protractor code

When writing tests in protractor, what should be used in element(by.css("")) to reference the class <a class="button button-large button-secondary has-shield download-btn"? var HomePage = function() { this.centerStageButtons = element(by.css(".text-c ...

What is the reason for an NPM module's dependency always being installed within nested node_modules directories?

It has come to my attention that NPM v3 makes an effort to keep the dependency tree flat. Initially, I believed this was done only to address conflicts when multiple versions of the same module are present. However, there is something peculiar about the p ...

Putting Jenkins, selenium-grid, and protractor to the test with end-to-end testing

Currently, I am in the process of setting up my testing environment using Jenkins, Selenium, and Protractor. To efficiently distribute tests across remote machines (nodes), I have opted to utilize the selenium-plugin (selenium grid). The initial progress i ...