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
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
567 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
458 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
375 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 ...
3
votes
4answers
976 views

locating element by id or css, which is faster?

If there is an id available for an object in a page, find element by ID or CSS - which is faster? element(by.id("btnButtonID")) OR element(by.css("#btnButtonID") Since we can identify any objects ...
3
votes
2answers
5k 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 to cite this error - WebDriverError: unknown error: ...
3
votes
1answer
3k views

How to Verify the string / text by using Protractor

I want to verify that one screen string value with other screen string value. For example, if I try to select one product from the product list screen, the product detail screen is opened which is ...
3
votes
1answer
1k 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
324 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 a custom message with passed, Thanks in advance
3
votes
1answer
1k views

Protractor- in same page how to switch from non angular to angular, its clicking on non angular elements but not on angular?

In the same page how to switch from non-angular to angular, it is clicking on non-angular elements but not on angular, when clicking on non-angular lookup then angular window(Popup) will open
3
votes
1answer
5k 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
2k 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
2k views

Parallel protractor tests are still running sequentially

Looking For: I want to run Specs in Parallel. Tried: Included in config file: shardTestFiles : true, maxInstances: 4 Output I see: Multiple instances are not opening. Still running in serial. **...
3
votes
1answer
939 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
0answers
326 views

Protractor: Getting 'Failed: Unknown error' for test running in Edge Browser

My setup: Protractor Version: 5.3.0 Edge Version: 38.14393.2068.0 Edge HTML: 14.14393 MicrosoftWebDriver.exe version: 10.0.14393.0 Windows 10 Enterprise 64-bit Code: seleniumAddress: 'http://...
3
votes
0answers
185 views

Protractor isClickable with a twist

New to protractor and excited about learning. I have researched and read posts and learned a lot but this one has me stumped. The UI has a table which lists products based on their state. Once the ...
3
votes
0answers
936 views

Protractor starts Firefox but doesn't run any tests

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 ...
3
votes
1answer
1k 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
0answers
360 views

Multiple protractor tests creation using loops based on returned promise value

I would like to dynamically generate it blocks based on the values returned by a promise. Something along these lines: describe('Main Page', function() { var rowNumber=event.script1(); //---...
3
votes
0answers
602 views

Unable to add/attach screenshot and test steps in Report

I am working on protractor and using "protractor-angular-screenshot-reporter" to generate the report. But I am unable to add screenshot and test steps in this report. Can anyone please help ...
2
votes
2answers
248 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
8k views

Can Jasmine tests be executed in a specific order?

I believe it is considered to be a bad practice to rely on the order in which the (acceptance) tests should be run, but for testing "deeply nested features" (I don't know if there is a standard term ...
2
votes
1answer
5k views

Protractor - How to use async/await

I am completely new to protractor, and I came across the async/await. Using: node version 8.9.4 protractor version 5.3.0. Is it necessary to use async/await in all your script? And how to use with ...
2
votes
2answers
4k views

How to query the Canvas using Selenium with JavaScript Executor or Protractor?

I like to know if it's possible to automate this 'graph' which is created on the canvas, if yes, how to automate it. I have to interact with all the elements on the 'graph or a map like thing' by ...
2
votes
1answer
3k views

AngularJS- setting up Protractor to test front-end user interaction

I am working on an AngularJS app, and am looking to add some automated testing to the development life cycle of the project. After doing a bit of research, and asking on here about what frameworks ...
2
votes
1answer
114 views

How to verify text order/position?

How can a protractor test verify the location and order of text on page? Our application generates schedules that is comprised of divs in specific orders depending on the date/time and type of ...
2
votes
1answer
344 views

Average protractor test script length?

Looking for protractor best practices of sorts, is there any recommended 'average' length or size of an individual end to end test? Our platforms features are all highly dependent upon on another so ...
2
votes
1answer
2k views

Protractor can't see the file just downloaded into the folder

// gives count of downloads in download folder. this.getCountOfDownloads = function (fileName,elementToClick) { //provides a way to look for filenames matching a certain pattern (in the worst ...
2
votes
2answers
3k views

Protractor tests run in parallel influence each other

I currently have Protractor set up to run multiple Chrome instances so that I can run my tests in parallel. However, I've noticed that the tests in one browser instance are influencing tests in ...
2
votes
1answer
2k views

Parallel execution : Protractor

I need to reduce the run time of my Protractor tests, so I want them to run parallel on multiple app servers. Protractor can by multiCapabilities to open multiple instances of webdriver, but for all ...
2
votes
3answers
258 views

Is there a way to capture Jasmine assertions?

Is there a way to capture expect failures in Jasmine? This doesn't work, the exception is not captured. try { expect(1).toBe(3) } catch (e) { } I am looking for something like this TestNG ...
2
votes
1answer
430 views

How to do right mouse click in protractor chrome?

After referring to: PROTRACTOR: Right click on link and open in NEW TAB I tried below code : describe('Right click', function () { it('test {Regression} {Sanity} {Sanity}', async ...
2
votes
1answer
150 views

Integrating Protractor to Octopus deployment (CI/CD Integration)

I have a batch file with below content: %1 %2 --params.validFile=%3 --params.invalidFile=%4 I am starting it through power shell script: $path= "<filePath>\start.bat" $...
2
votes
1answer
125 views

Protractor right approach to page object model

On Investigating on protractor page object model, i came across the below two approaches: First: var AngularHomepage = function() { var nameInput = element(by.model('yourName')); var greeting =...
2
votes
1answer
116 views

getText() which is in between <div> </div> tag?

Get text which are in between tags DOM <div id="div_ResultMessage" class="AlertmsgDiv"> <div id="lblSuccessMessage" class="alert alert-success alert-dismissable"> <div ...
2
votes
1answer
414 views

Migrating from AngularJS to ReactJS or what to do with existing e2e tests

The Story We have a mission critical AngularJS application which we extensively test with e2e tests using Protractor/WebdriverJS. At the current state, we have ~30000 lines of existing e2e tests which ...
2
votes
2answers
3k views

Protractor: Iterate through table <td> and click the link by TEXT

Requirement : link is present inside table >td>p>a. I want to click on link by TEXT (something like contains(Text)) Tried: by.CssContainsText("a","Text") . I did not work, ...
2
votes
1answer
3k views

Protractor: Firefox browser opens but URL is not launched

I am trying to run TestCase in Firefox browser. Result is : Firefox browser opens, but URL is not loading. FIREFOX browser - 53 Selenium- webdriver - 3.6.0 NPM - 3.10.10 Protractor ...
2
votes
3answers
3k views

AngularJS testing using Protractor- how to close a dialog that opens automatically in order to continue with tests?

I am developing a test suite for one of my company's products- the product has been written in AngularJS, and I am using Protractor as the testing tool. Having never really used automated testing ...
2
votes
1answer
2k views

Attaching screenshots to JUnit test reports

We run our tests on Jenkins using Protractor generating a JUnit XML test report via JUnitXmlReporter from jasmine-reporters. Is it possible to attach screenshots, with the current state of an ...
2
votes
3answers
3k views

Protractor - Find delete button in <tr> with respect to <td> in other <tr>

In the web page, we have a number of rows (with row nested to it). The below code is a snippet for one such row. <tr ng-repeat="abc" class="alpha"> <td class="one ng-binding"> Apple &...
2
votes
1answer
148 views

Test all checkbox combinations using Protractor

In my Angular page there are 15 checkboxes and a label that when I select on each checkbox individually, a result will appear in the label. Plus when a checkbox click with a combination with others, ...
2
votes
1answer
2k views

How to access step definition variables using hooks.js

Hi in the below protractor-cucumber step-definition, I can modify the step definition variable a from before hook: "use strict"; let { Given, Before } = require('cucumber'); ...
2
votes
1answer
333 views

How to explicity fail e2e tests on unexpected behavior?

I am currently using protractor but the idea would be similar for any flavor of Selenium. Right now, depending on which step the test is on, my current framework will wait for elements to be ...
2
votes
2answers
1k views

Maximizing Chrome Window size in Jenkins for Protractor Tests

We are in the process of setting up Jenkins for our testing projects and we are facing a huge challenge for browser window size. The app we are testing is a Progressing app so with the default screen ...
2
votes
3answers
5k views

Protractor - Element not found

I'm new to protractor and trying write a script. But every time I try to locate an element "The Element not found" error is coming. These are the error messages I'm getting: Failed: No ...
2
votes
3answers
7k views

Scrolling to Bottom of the Text Area using Protractor

I have a text field that I need to scroll to the bottom of in order for the Next button to be activated to click. This project is using Angular 6 my tests are end to end test running on the protractor/...
2
votes
1answer
1k views

Protractor ConfigParser Error 105 getPage Timeout when trying to print to console

In Protractor, I need to run one line of code from the test suite called mytest: console.log('my first Protractor test'); I am not loading any webpages. I am only printing to the console. I have ...
2
votes
1answer
1k views

How can i click on Save button to save a downloaded file using protractor in IE

How can i click on Save button to save a downloaded file using protractor in IE.