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
2answers
121 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 ...
1
vote
1answer
53 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?
1
vote
1answer
43 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('...
0
votes
1answer
28 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 ...
0
votes
1answer
22 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
0
votes
1answer
64 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 ...
3
votes
1answer
111 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 ...
2
votes
3answers
63 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 ...
0
votes
1answer
65 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 ...
0
votes
1answer
93 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 ...
2
votes
1answer
92 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 ...
0
votes
1answer
37 views

How to switch the driver session between mobile and webbrowser sessions [closed]

Here i have a scenario to test the following iam posting some content from the web channel and want to cross verify the same in the mobile app version vice versa
1
vote
1answer
85 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, ...
0
votes
0answers
21 views

Run protractor in a mobile setup

I want to run protractor tests in a mobile setup. This is the capabilities of my config file capabilities: { browserName: 'chrome', platformName: 'Android', platformVersion: '7.0', ...
1
vote
1answer
39 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 ...
4
votes
2answers
179 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 ...
1
vote
1answer
40 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 / ...
4
votes
1answer
428 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 ...
0
votes
1answer
194 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-...
2
votes
2answers
1k 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 ...
1
vote
1answer
38 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 ...
1
vote
2answers
263 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 = ...
0
votes
1answer
995 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', ...
3
votes
1answer
734 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 ...
5
votes
2answers
256 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....
10
votes
2answers
423 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 = ...
3
votes
1answer
505 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 ...
2
votes
1answer
678 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'); ...
4
votes
2answers
605 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 ...
0
votes
1answer
87 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 ...
1
vote
1answer
89 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({ ...
-2
votes
1answer
56 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 (...
5
votes
1answer
64 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 ...
2
votes
1answer
98 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" $...
1
vote
2answers
1k 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 ...
4
votes
1answer
128 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" ...
1
vote
1answer
364 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 ...
2
votes
1answer
61 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 =...
3
votes
1answer
322 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 --...
0
votes
2answers
867 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?
0
votes
1answer
368 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(). ...
3
votes
4answers
464 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 ...
1
vote
2answers
117 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: ...
1
vote
1answer
150 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 ...
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: ...
0
votes
1answer
569 views

I am getting the error UnhandledPromiseRejectionWarning: UnsupportedOperationError: sendKeysToActiveElement

I used the below lines of code but i have been facing an issue. browser.actions().mouseMove(control).keyDown(protractor.Key.CONTROL).keyUp(protractor .Key.CONTROL).perform().then(function());
0
votes
1answer
40 views

Is it possible to use methods in java library or a java project snapshot in a protractor project? [closed]

If I create database testing project using java and export to a snapshot(as a jar), can I use it in a protractor project? Hoping to use in protractor project, protractor,jasmine framework along ...
0
votes
2answers
64 views

User Acceptance Tests with mouse/keyboard capture and picture compare

We have several Angular applications (Micro UIs) and they are all 100% covered by our UATs (User Acceptance Tests) written with Protractor (Angular Test Framework based on Selenium). There are ...
0
votes
1answer
783 views

Why element locators are not suggested in visual studio code for protractor?

I don't get suggestions for "element(by." element locators in visual studio code. Im using protractor. I have changed the settings file also. Settings.js { "editor.quickSuggestions": { "...
0
votes
2answers
2k views

How to fix “Cannot find module” error and “Error: ReferenceError: Element is not defined” in protractor?

I have created a test project using page object model. When I run, it creates "Cannot find module" error. I have tried several answers but didn't work. Here is my code Config.js exports....

1
2 3 4 5