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
1answer
307 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, ...
1
vote
1answer
118 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 ...
1
vote
1answer
64 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
581 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 = ...
1
vote
1answer
280 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({ ...
1
vote
1answer
664 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 ...
1
vote
2answers
328 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
633 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 ...
1
vote
1answer
2k views

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

I want to retrieve a value in 'Given' function and then store it in a global variable so that the value is accessible in subsequent steps of a scenario in protractor cucumber typescript based ...
1
vote
1answer
2k views

how do I define global variable in conf.js and used in spec.js file in jasmine protractor?

describe('Enter Base API URL', function() { it('1st scenario', function() { // Take any URL. browser.get('xyz.com'); browser.ignoreSynchronization=true; var user= by.xpath('//...
1
vote
1answer
697 views

Cucumber Protractor tests is returning 0 scenarios

I was trying to run a sample test in cucumber protractor javascript tests. But it is returning 0 scenarios.Could someone please look into my code pasted below. sample_scenario.feature Feature: To ...
1
vote
1answer
490 views

How to structure data driven Protractor/JS tests in page object model?

I am using protractor/js for automating end to end tests for our website. We have a test data set that we have saved in different JS files and we use this data while executing test cases. We are ...
1
vote
1answer
60 views

Same element locators under different parents

This is more of a "code review" question but it is very SQA specific so posting it here. There are two different menus on a page: "left" and "right" both containing "save" and "cancel" buttons with ...
1
vote
2answers
932 views

How to enter acceptable fake data to login page which is tests using protractor?

I am completely new to the protractor and currently, I'm testing my login page using my own login data and I want to use dummy data as profile login data. Can these enter in my spec.ts file or ...
1
vote
1answer
526 views

Protractor - How can I bypass the mixed content error

I am getting the below error when I was trying to approve a document in a webpage Mixed Content: The page at \'https://example.com\' was loaded over HTTPS, but requested an insecure resource \'http://...
1
vote
2answers
4k views

Protractor + Jenkins , element not interactable

On my local, I start e2e tests in Protractor and this is good. I have problem when I want start tests on Jenkins job. I pull tests from repo run command npm install run command node_modules\.bin\ng ...
1
vote
1answer
2k views

Not able to check the checkboxes on a javascript page

Here is the code I used to select the checkboxes selectAllEmployeeInputRequired() { this.scrollToAndClick(this.employeeInputButton); return browser.wait(this.isVisible(this.employeeInputModalForm)) ...
1
vote
1answer
4k views

E2E - How to test login with fake data - username and password?

I do have an angular login page build as a SPA: http://localhost:port/login which works fine. And I wrote an E2E integration test for that. It runs fine regarding checking the input-text for username ...
1
vote
1answer
4k views

Running Protractor tests from Jenkins

Usually, I used to run from command line (protractor config.js). I used protractor and java script. PLS LET ME KNOW STEPS TO ACHIEVE RUNNING FROM JENKINS To run from Jenkins , I created a batch file ...
1
vote
1answer
234 views

I want to run report(.html file) of protractor-html-reportor

I am doing end-2-end testing with protractor. And for creating a report of all these test cases, I am using protractor-html-reporter, which creates an .html file as report of all these test cases. ...
1
vote
1answer
3k views

How to verify column count using protractor

I need to verify the column count of a table based off of the security role of the logged in user. How can I verify that in some instances 5 columns are displayed but in other instances 4 or 3? The ...
1
vote
1answer
400 views

Verify specific text with same locator and verify generated spreadsheet using Protractor

How can I verify specific text within an unordered list using Protractor? Here is a sample of the code <ul class="list-unstyled"> <li ng-repeat="field in parsedTemplate.fields" class="ng-...
1
vote
1answer
5k views

Change a URL to be environment specific in protractor test

I have a protractor test that locates a URL on a page. The URL is then clicked and expected to contain specific text. The URL needs to be manipulated before the browser opens it, how can I change the ...
1
vote
1answer
1k views

Add reusable code to existing protractor page objects file

I inherited 45 spec files with correlating page object files that are used only to locate elements on the pages. I am trying to create reusable code, is it best practice/can additional exports be ...
1
vote
1answer
5k views

Locating ng-click in protractor

I cannot figure out how to locate ng-click in the page object file for the code below: <a ng-click="toggleGuestParams('personal')" class="ng-click-active">Select/Unselect All</a> There ...
1
vote
3answers
2k views

How can I locate the navigation element by text?

<li class="nav-item" ng-reflect-ng-class="nav-item,"> <a class="nav-link" href="javascript:void(0);"> <span>By Coordinator &amp; Salesman</span> <!-...
1
vote
1answer
1k views

How to distinguish ng-bind's in Protractor?

I was looking for some help on how to distinguish a bunch of ng-binds that are in an ng-repeat. The goal of this situation is to go through the ng-repeat list of documents, and click on the ng-bind ...
1
vote
4answers
675 views

End-to-end testing from desktop app to website

I'm currently investigating ways for executing End-to-end testing on a system that contains two parts which are dependent on one another. The first part is a desktop application and the second is a ...
1
vote
1answer
768 views

Protractor on offline app? Does it work?

I was wondering is there anyway to do E2E testing for an offline app with protractor? I cache my pages in the application cache and store data using localForage, testing it online is fine, but I also ...
1
vote
1answer
21 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()...
1
vote
3answers
4k 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 ...
1
vote
2answers
2k views

'to.include' is not working where 'to.eventually.equal' is working

I was trying to check whether a string is present in another string. I am using the below code: expect(actualTimeZone).to.include(employee.timeZone); But it is giving the below error: ...
1
vote
0answers
152 views

(Visual) testing of the geographic/GIS maps functionality using Protractor

I'm preparing an automated system/end2end tests for the AngularJS application using Protractor. One part of the application, that I'm going to test, displays geographical maps. I need to verify for ...
1
vote
1answer
903 views

E2E: How to execute click event twice and successively - without any error?

I do have a register process/form which passes email, password, confirmPass and a tc checkbox which has a boolean value. When the user submits the form, an open dialogue with a text opens and in the ...
1
vote
4answers
9k views

Protractor - jasmine; How to click submit button

Our dev has a submit button like this: <button _ngcontent-c6="" class="btn btn-block btn-primary mt-lg" type="submit">Login</button> I tried using: element(by.buttonText('#submit')); ...
1
vote
0answers
1k views

Partial text sent when using SendKeys in Protractor

Inconsistently, the partial text is being sent when using SendKeys and causes a particular spec to fail. Below is the test that needs to happen for the other tests to past successfully it('should ...
1
vote
1answer
800 views

Cannot run tests using Protractor and Saucelabs

I'm trying to run my e-2-e tests using protractor and saucelabs. When I run protractor I see the following output: protractor conf.js [15:56:40] I/launcher - Running 1 instances of WebDriver ...
1
vote
0answers
473 views

Protractor port option error when trying to upload a CSV file

I'm receiving the following error in a protractor test when trying to upload a CSV file: Failed: "port" option should be >= 0 and < 65536: 100000 I inherited these tests but there is ...
1
vote
0answers
548 views

Unable to run the Protractor tests in safari browser and build failed

My safari browser unable to locate the elements also and used so many delays: My Configurations are: iMAC Version: 10.11.6 OS X El Capitan Safari Version: 10.0.3 Protractor version: 5.1.1 ...
0
votes
2answers
58 views

Which is faster: creating a method to reference a web element by label text, or directly referencing the element via a UI?

The automation framework I'm working within has a method in the PageObject file to return a WebElement by its label text: getSubTab : { value : function(value){ return this.navTabs.filter(...
0
votes
2answers
12k views

Get current time in HH:MM format

How to get the current time and send it in HH:MM format in a field to schedule an event at the current time using Protractor?
0
votes
2answers
2k 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
2answers
987 views

Protractor or Selenide for automation testing Angular6?

We began automation testing of our new project, which is implemented on Angular6. We decided to split the testing of the front-end, back-end and user-scenarios. To automate the testing of the back-...
0
votes
1answer
3k views

Please help with simple test case in jasmine

I am stuck with jasmine. I read/youtubed/googled but seems like I am on the wrong track. Here is what I have so far. I've used protractor --elementExplorer to pull items from http://www.angular.io: &...
0
votes
2answers
637 views

jenkins job for protractor cucumber

I have a protractor cucumber intellij project. I want to create a jenkins job that can run my tests. I have no idea how to do it. I could not find any tutorials that explain where to start from.
0
votes
4answers
281 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 ...
0
votes
1answer
86 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
251 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 ...
0
votes
1answer
298 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
586 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-...