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
votes
1answer
16 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 ...
0
votes
2answers
38 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
20 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
600 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 citing this error - WebDriverError: unknown error: ...
0
votes
1answer
162 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
25 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
38 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
0answers
26 views

Control is not switched to iframe if I run test case in Firefox: Protractor

I am trying to run my script(Protractor) in Firefox. There is as iframe on page and I need to click on a link in that iframe. That click redirects to new tab and I need to switch in that tab too. ...
0
votes
1answer
74 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
1answer
57 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....
0
votes
0answers
79 views

How to access Angular component variables in protractor E2E test?

In Angular JS, there is an option to set and get the controller variables via protractor using "Evaluate()" function like in the below example, > element.all(by.repeater("address in addresses"))....
1
vote
1answer
82 views

Writing different tests for different environments

We didn't implement automated deployment yet to our Angular 7 project, so environment-based variables (e.g baseUrl) are changed manually, causing the application to crash after deployment a lot due to ...
0
votes
2answers
50 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(...
1
vote
1answer
63 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
votes
1answer
111 views

Transition from selenium to protractor - worth it?

Over the last few weeks, We have been experimenting with a protractor+typescript+cucumber framework for our new Angular 6 application. The main reason we thought our present Selenium+Cucumber+java ...
0
votes
0answers
52 views

Webdriver instances not created for custom protractor.conf file

I want to integrate my E2E suite in Travis, so I followed this article. As mentioned in the article I've created a custom protractor.ci.conf.js file of the Travis build. I've placed this file inside ...
0
votes
1answer
166 views

Appium + Protractor : element not intractable

I am using Appium and Protractor for e2e testing of my Ionic 4 application. The application Starts from the login page. Currently, I have implemented my spec.ts file as below import {browser, by, ...
2
votes
1answer
80 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 ...
1
vote
1answer
69 views

how can I find element on next page, while it is not presenting on present page?

I have a total of 200 users. I have one angular page which has showed 20 users on the present page. Now, I want to find a random user which is in any next pages. I have page navigator button on the ...
2
votes
1answer
446 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 ...
1
vote
2answers
589 views

How to attach screenshot to protractor's HTML report?

In my protractor project, i am trying to take an screenshot, and attach it to my html report. The process of taking screenshot is happening in an After hook, as below: import { Status,After, ...
2
votes
0answers
114 views

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

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 seleniumAddress: 'http://localhost:17556/', ...
0
votes
1answer
159 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('//...
2
votes
1answer
435 views

Unexpected alerts from Chrome using Protractor

2 days ago I have started to receive unexpected alerts when leaving the page (actions that change the URL really). (those alerts do not appear in a 'real' browser). I have checked the compatibility ...
1
vote
1answer
116 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 ...
0
votes
1answer
100 views

Get value from element of type <a>

So this is the HTML <ul class="has-status sub-menu"> <!-- ngRepeat: subItem in item.subMenuItems track by subItem.name --> <li ng-repeat="subItem in item.subMenuItems track by ...
1
vote
1answer
305 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
2answers
305 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 ...
0
votes
1answer
395 views

How to find radio button value and ID with xpath

<rhr-radio-button element-id="tenderValidType" model="$ctrl.additionalData.procProcedure.tenderValidType" value="UNTIL_DATE" label="additionalData.tenderValidUntil" required="::$ctrl.requiredFields[...
1
vote
1answer
53 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
246 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
2answers
215 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 ...
2
votes
1answer
72 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 ...
1
vote
1answer
872 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 ...
1
vote
3answers
1k views

Element not found error in protractor

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 element found ...
2
votes
1answer
298 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 ...
0
votes
1answer
559 views

Unable to run protractor script

I'm not able to run my protractor tests. Getting the below error: grunt cltest Running "protractor:singlerun" (protractor) task (node:26770) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. ...
1
vote
1answer
55 views

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://...
2
votes
1answer
2k views

How to use async/await with Protractor-nodejs8

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

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

Requirement : link is present inside tabel >td>p>a . i want to Click link the link by TEXT (something like contains(Text)) Tried : by.CssContainsText("a","Text") . did not work, as multiple entry ...
0
votes
2answers
297 views

Protractor using Typescript and cucumber

I need to click on 'homebutton' button of a angular website through typescript in protractor and after clicking need to check that i am on homepage of the website. can anybody tell me this?
1
vote
2answers
3k 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 ...
3
votes
2answers
283 views

Protractor Image didnt upload on dialogue box?

I want to test the image upload functionality using Protractor but my written script didn't work. When we click on the dialogue box image it opens the window to select the desired image. After the ...
3
votes
1answer
424 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 ...
2
votes
0answers
129 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 ...
1
vote
0answers
74 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 ...
0
votes
1answer
2k views

PROTRACTOR: Right click on link and open in NEW TAB

TestCase: Right click on link element and open in NEW TAB or NEW WINDOW. I could able to right click on the element using the below code . BUT NOT SURE HOW TO SELECT THE OPTION OF "OPEN Link in NEW ...
4
votes
2answers
165 views

How to structure automated tests for feature with two dashboards?

I'm going to prepare e2e tests for chat app with two customer dashboards. First (written in Angular) is accessible from desktop browsers and second (Ionic) through mobile devices. When customer ...
0
votes
1answer
390 views

unable to run test cases in IE browser in protractor, selenium framework for angular.js web application

I was trying to execute test cases in IE, and I am facing errors as shown in error picture, my config file is shown below. using IE 11.09 with selenium webdriver-4.0.0 in windows server 2012 R2 ...
2
votes
2answers
3k 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/...