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
1 vote
2 answers
124 views

Test users password- static or dynamic

During our e2e testing, 100+ test users are created on our application. Workflow goes like this: 1. Generating a random password with faker library 2. Storing it in a variable 3. Using the variable to ...
mark_Ruff's user avatar
1 vote
1 answer
100 views

Screenshot not found error in protractor

I am getting broken image for screenshot. Unable to take screenshot in protractor framework. Please anyone help on this. My code: testconfig.js file var fs = require('fs-extra'); var today = new Date()...
Lakshmi's user avatar
  • 11
1 vote
0 answers
124 views

Protractor file upload hanging after send keys on IE11. Works on Chrome/Firefox

I have a Protractor/Cucumber script, that successfully uploads a file on Chrome/Firefox. When I run the same script on IE11, then the website hangs with the file dialog box open and no file sent. The ...
Devin Patrick Ashcraft's user avatar
-1 votes
1 answer
116 views

How to determine test coverage on a Protractor/Jasmine project

I'm new to a project that is in active development but is a mature application. It has a lot of Protractor/Jasmine tests, but they are organized somewhat poorly. For example, multiple identical or ...
Andy J.'s user avatar
-3 votes
1 answer
611 views

Replacement for Protractor in test automation project?

I'm working in a project where I run a lot of end to end tests prepared using Protractor framework - testing dashboard written in Angular JS and Ionic 4 web application. However I started to spot a ...
tiglatpilesar's user avatar
2 votes
1 answer
330 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, ...
WhiteFlower's user avatar
1 vote
2 answers
905 views

How to download files in folder other then the download folder using Protractor?

Using the following configuration, files are always saved in the download folder instead of the folder set for default_directory. 'capabilities': { 'browserName': 'chrome', 'chromeOptions': { ...
user47928's user avatar
0 votes
4 answers
355 views

Recommendations on adoption of protractor over selenium for angular app

We currently have automation framework using selenium Webdriver C# bindings .The application under test is being re-written in angular.The QA team is familiar with C# and selenium , so we are ...
VSD's user avatar
  • 97
1 vote
2 answers
2k views

Script timeout in Protractor

My current scenario is: the user types the username, password, and click on the login button. Then, the next screen shows a list box with Stores to login. Protractor loads this list box but it does ...
Ingridd Brito's user avatar
1 vote
1 answer
914 views

What is the meaning of test runner? What is the meaning of test runner in layman terms? [closed]

What is the meaning of test runner? Protractor is a test runner. What is the meaning of test runner in layman terms?
Ramya Shree's user avatar
1 vote
1 answer
388 views

Hooks not getting executed in protractor cucumber

I new to protractor, and trying to implement hooks. But the hooks are not getting executed. Following is my code: Hook.js: const { Before } = require('cucumber'); const {AfterAll} = require('...
Saloni Singhal's user avatar
0 votes
1 answer
2k views

Getting undefined when I define {string} parameter in the when section in the step definition in protractor cucumber

I am new to protractor with cucumber. I have to automate a flow wherein on entering first name, last name, and postcode, a new user is created. I am trying to add the data to be entered in the feature ...
Saloni Singhal's user avatar
2 votes
1 answer
46 views

Is there a way to write protractor tests to test on devices plugged into my pc not via browserstack

we are trying to save some money and have devices here already to test on, is there a way i can setup my tests to run on them ? Thank you in advance
ratman330's user avatar
0 votes
1 answer
422 views

Click in Protractor is too fast

After clicking on a button, a dialog for confirming should be displayed at the bottom of the page. But Protractor clicks too fast on this button, that the next page is loaded without displays the ...
Ingridd Brito's user avatar
3 votes
1 answer
740 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 ...
Dav234's user avatar
  • 33
2 votes
3 answers
639 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 ...
PDHide's user avatar
  • 11k
0 votes
1 answer
541 views

Protractor does not load the page correctly

After clicking on the confirmation button, the next screen should display a confirmation message. But protractor just loads the page without display this confirmation. The strange thing is that I have ...
Ingridd Brito's user avatar
1 vote
1 answer
325 views

Is it possible to test Desktop Applications using Protractor directly or via a third party tool?

I have an application built over angular (new version) and WinForms (legacy) which needs to be automated for testing. I had identified selenium (WinAppDriver + NgWebDriver) as the possible tool for ...
Bugger's user avatar
  • 11
2 votes
1 answer
680 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 ...
jk2001's user avatar
  • 23
1 vote
1 answer
474 views

Click, hold and drag to the left in Protractor

For my site, I want to click, hold and drag to the left an element, so it appears a trash icon. I don't want to drag to a specific position, but just drag to the left, so I tried to decrease X value, ...
Ingridd Brito's user avatar
1 vote
1 answer
201 views

Simulate press hard key in protractor

I am using Protractor for testing my web application. During the use of the app, I want to press a hard key on the device, like the home screen, then the app will be minimized and I will see the ...
Ingridd Brito's user avatar
4 votes
2 answers
1k 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 ...
Ingridd Brito's user avatar
2 votes
1 answer
143 views

GUI Testing Angular SPA?

Developer here. Our QA team is researching new strategies for E2E testing for a new product. To start, it will be an Angular SPA, and eventually a PWA. They are leaning towards using Quantum / ...
Jacob Ensor's user avatar
5 votes
1 answer
1k 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 ...
Luke's user avatar
  • 53
1 vote
1 answer
2k views

How to get text from an element , when getText fails

I have the following element element(by.css("span[aria-label='Picker ID, TESTUSER']") I want to assure the text on this filed is TESTUSER, so I tried: expect(element(by.css("span[aria-...
Ingridd Brito's user avatar
4 votes
2 answers
8k 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 ...
Im Nobody's user avatar
1 vote
1 answer
110 views

E2E Test application flow on multiple devices

Our applications flow start on desktop. At later phase there are some scenarios where the processes require an approval on a touch device. The user waits at a page on desktop. If the user opens the ...
Justbrave's user avatar
1 vote
2 answers
836 views

How to getText concatenating 2 strings in Protractor

I have 2 variables that get the texts: locationDisplayed and bindisplayed. I want the 3rd variable: expectedDescription concats the text of the first 2 vars. Here is the code: let locationDisplayed = ...
Ingridd Brito's user avatar
0 votes
1 answer
4k views

Element not interactable in a non Angular site

For my test, I am using protractor. The test first opens an Angular page, do some actions and then open a nonangular site. For the nonangular site I did the following: it('should login on BC', ...
Ingridd Brito's user avatar
3 votes
1 answer
2k views

How webdriver version is used in protractor

I have chrome 80 installed in my system. webdriver manager version: webdriver-manager 12.1.7 webdriver status: Protractor version: Version 5.4.2 Issue: This configuration works fine in local ...
PDHide's user avatar
  • 11k
5 votes
2 answers
2k 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....
PDHide's user avatar
  • 11k
11 votes
2 answers
690 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 = ...
PDHide's user avatar
  • 11k
3 votes
1 answer
2k 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 ...
John's user avatar
  • 33
2 votes
1 answer
3k 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'); ...
Learner's user avatar
  • 75
4 votes
2 answers
2k 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 ...
Learner's user avatar
  • 75
0 votes
1 answer
127 views

How to pass automation test case data from TFS to Protractor using Cucumber/Jasmine

I am using Visual Studio Code, Protractor, Typescript and Jasmine to build test cases fro Angular website. I need to pick test data from Team Foundation server(TFS) only. It was possible in Coded UI ...
Saur100's user avatar
  • 21
1 vote
1 answer
381 views

Get variable in conf.js and use it through spec files

This is what I have in protractor.conf.js: let localNodeStorage = require('./helpers/localStorageNode'); exports.config ={onPrepare: async () => { require('ts-node').register({ ...
perivoje's user avatar
-2 votes
1 answer
67 views

Automation Testing using selenium webDriver on a javaScript based application

I am having a JavaScript-based application to automate using Selenium WebDriver. Can I automate a Javascript based application using Java with Selenium WebDriver OR do I have to use protractor (...
Updesh Kumar's user avatar
5 votes
1 answer
210 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 ...
PDHide's user avatar
  • 11k
2 votes
1 answer
169 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" $...
PDHide's user avatar
  • 11k
2 votes
4 answers
6k views

How to bring elements to view automatically in Protractor or selenium

I have a webpage to be tested which has a button at the footer of the page. When i click it, there should be an error message shown near to it. I was successful in automating this scenario but the ...
PDHide's user avatar
  • 11k
7 votes
2 answers
803 views

How expected condition 'isClickable' works in Protractor

I am trying to click a button as defined below: <button _ngcontent-xjt-c6="" class="ef-ui-btn-inline-sm ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only" ...
PDHide's user avatar
  • 11k
1 vote
1 answer
788 views

How to get browserName in protractor

Hi i want to get browser name in the onPrepare function, I used the below code. browser.getCapabilities().then((c) => { c.get('browserName'); }); the code writes the browser name properly ...
PDHide's user avatar
  • 11k
2 votes
1 answer
144 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 =...
PDHide's user avatar
  • 11k
3 votes
1 answer
748 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 --...
user41907's user avatar
1 vote
2 answers
3k views

How to tell protractor to wait for each command for 3 seconds

I am running angular e2e scripts. I am adding explicit wait for every element. Instead, is it possible to tell protractor to delay 3 seconds for every command?
STE's user avatar
  • 749
0 votes
1 answer
692 views

Protractor- switch from non- angular to angular

Login page is non- angular. So I set browser.ignoreSynchronization = true; Then after passing the login screen, I have set browser.ignoreSynchronization = false. Also, I have used browser.refresh(). ...
STE's user avatar
  • 749
3 votes
4 answers
2k 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 ...
Rahul Raj's user avatar
1 vote
2 answers
628 views

How to handle with webdrivers in visual studio code Protractor?

I was getting an error WebDriverError: unknown error: cannot determine loading status from unknown error: missing or invalid 'entry.level' (Session info: chrome=76.0.3809.100) (Driver info: ...
Arslan Khan Afridi's user avatar
1 vote
1 answer
759 views

Expecting Null equal to 'Some Value' in Protractor

I enter the value with this code: var FirstName = element(by.name('firstName')); FirstName.clear().sendKeys('RM'); The code updates the profile of the user correctly. Now I am trying to read ...
Arslan khan's user avatar

1
2 3 4 5