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
-2
votes
1answer
35 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 (...
-2
votes
0answers
16 views

E2E testing tool for AngularJS/Angular/Symfony

We have a lage web application developed in AngularJS, Angular 2+ (JSON APIs with Symfony) and a part with Symfony (Twig). The QA team is looking to automate testing. Protractor has good support for ...
0
votes
0answers
5 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 shows more errors about my angular application. When directconnect flag is removed , there is no warning ...
2
votes
1answer
31 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" $args= '"<filePath&...
0
votes
2answers
52 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
0answers
33 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" icon="pi pi-chevron-...
1
vote
1answer
39 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 ...
0
votes
1answer
30 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
45 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
50 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
38 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(). ...
2
votes
4answers
89 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
47 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
23 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
2k 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
246 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
27 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
44 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
37 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
118 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
270 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
144 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
90 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
53 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
129 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
177 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
82 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
209 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
92 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
73 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
665 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
874 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
146 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
325 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
644 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
161 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
104 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
354 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
388 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
516 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
55 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
461 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
305 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
74 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
1k 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
2k 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
332 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
832 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
61 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
3k 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 ...