All Questions

0
votes
1answer
34 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
24 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....
2
votes
1answer
73 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
64 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 ...
1
vote
1answer
69 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
91 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
199 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 ...
0
votes
1answer
247 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
2answers
89 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: ...
2
votes
1answer
67 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
3answers
916 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 ...
1
vote
1answer
50 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://...
0
votes
0answers
290 views

How to debug a protractor test written in typescript using cucumber?

I have a sample project with my test cases written in protractor in ts. I could not able to debug the ts. package.json "debug": "node --inspect=1337 --debug-brk --nolazy node_modules/cucumber/bin/...
3
votes
2answers
131 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 ...
4
votes
6answers
220 views

How can a beginner develop an automated testing framework completely from scratch?

I am completely into manual testing, I was asked by my manager to start developing an automated framework for my company website and mobile application. I am a complete beginner and have a very little ...
0
votes
2answers
532 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-...
1
vote
3answers
488 views

Is it possible to test dynamic web sites using selenium?

I have a dynamic web site which is developed using angular(front end). Elements cannot be identified using ID,name etc... as they are not used to name elements. But models have used to name elements ...
0
votes
1answer
367 views

javascript isPresent always returning TRUE (Protractor)

So, I am accessing an application. There are multiple employee records. However, there are no duplicate records. I am deleting an employee record and then trying to verify that the employee record ...
1
vote
2answers
2k views

Need help with passing a variable in xpath

I am automating my application using Protractor. For one of the elements, I am using xpath, which is as follow: element(by.xpath('//ul[@id="employee-list"]/li[contains(text(),"Master Shifu")]')); ...
2
votes
1answer
459 views

How can i click on Save button to save a downloaded file using protractor in IE

How can i click on Save button to save a downloaded file using protractor in IE.
1
vote
1answer
787 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)) ...
2
votes
0answers
759 views

Protractor starts Firefox but doesn't run any tests

Problem is the web app i'm testing is behind 2 basic auths and requires a proxy. I wanted to pass the two basic auths by adding AutoAuth addon in a FireFox profile and setting up that profile to load ...
1
vote
1answer
3k views

How to make a variable in `protractor.conf.js` available in spec file?

I have a variable in protractor.conf.js which is exported within onPrepare() function as: global.myVariable = myVariable, and in spec file I'am trying to use/call it, but it seems that it can't be ...
2
votes
1answer
1k views

E2E: Retrieve email-link - How to invoke callBack function for mailListener?

I do have an E2E test for retrieving confirmation email after registration. I need the link in the confirmation email to login the user as the link in the email contains the token etc. for access. ...
1
vote
1answer
591 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 ...
2
votes
1answer
730 views

e2e test fails inconsistently

I do have an e2e test for an Angular app. It works fine on my local machine, but on the production repo, it runs inconsistently.. in other words sometimes it fails but sometimes it's runs successful. ...
1
vote
4answers
5k 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')); ...
0
votes
1answer
3k views

Protractor : How to resolve “failed loading configuration file conf.js”

I'm new to protractor, can somebody tell me how to fix error code 105 Q$ protractor conf.js [16:29:26] E/configParser - Error code: 105 [16:29:26] E/configParser - Error message: failed loading ...
4
votes
2answers
280 views

How to utilize javascript asynchronicity to speed up test execution?

How to utilize javascript asynchronicity to speed up test execution in protractor tests other than running tests in parallel? **Note:**This question is about utilizing core features of JavaScript ...
1
vote
1answer
3k 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 ...
5
votes
2answers
3k views

PROTRACTOR:How to tell protractor to stop or skip the TEST if any Test case is failed

Current Behavior: If any TestCase is Failed, Protractor not continuing with the next Testcase and holding to the same failed Testcase . Waits for long time and throws A Jasmine spec timed out. ...
2
votes
1answer
2k views

Unable to run Protractor tests in Microsoft Edge

I'm working on a project to begin testing Node/Angular applications using Protractor and Jasmine. I have a POC working in most browsers but having a lot of trouble with MS Edge. Here's my ...
5
votes
2answers
656 views

AngularJS testing with Protractor- How to make test scripts portable?

I was recently tasked with integrating some automated testing into the development life cycle for one of my company's products. The product has been developed using AngularJS, and has gone through ...
2
votes
3answers
2k views

AngularJS testing using Protractor- how to close a dialog that opens automatically in order to continue with tests?

I am developing a test suite for one of my company's products- the product has been written in AngularJS, and I am using Protractor as the testing tool. Having never really used automated testing ...
14
votes
4answers
11k views

Moving from Selenium to Protractor

I have been using Selenium/Java/Maven for functional automation testing in my project. But since angular is getting a lot of popularity, the development team has started using it for the development ...
2
votes
1answer
1k views

Testing AngularJS with Protractor- how to use services from within my tests?

I have recently started developing an automated test suite for one of my company's products, which has been written in AngularJS, using Protractor as the testing framework (although I have used ...
3
votes
2answers
1k views

Using Protractor to test AngularJS frontend- how do I get HTML DOM objects that are nested within other objects?

I am working on the development of an AngularJS app, and have recently been asked to look at integrating some automated testing into our development process. I have not used automated testing at all ...
1
vote
1answer
414 views

Integrating Protractor testing framework into my existing AngularJS app- invalid URL when testing on VM

I recently started working on an application that has been written in AngularJS, and have been tasked with setting up automated testing for the app (all of the testing that has been done as part of ...
2
votes
1answer
1k views

AngularJS- setting up Protractor to test front-end user interaction

I am working on an AngularJS app, and am looking to add some automated testing to the development life cycle of the project. After doing a bit of research, and asking on here about what frameworks ...
0
votes
1answer
384 views

How to test a third party editor in protractor

I need to automate a portion of the platform that involves opening a third party editor (BeeFree) and add contents to the editor. The editor is used to create email templates and main content (text, ...
4
votes
4answers
10k views

How should I find the XPath using selenium webdriver and protractor

I'm a beginner in automation testing. I'm trying to select a value from data list and I got an XPath like mentioned below: XPath : html/body/div[2]/div[1]/div/div[1] This is the HTML for the same :...
-1
votes
1answer
635 views

I'm unable to install protractor [closed]

Error in cmd C:\Users\user>npm install -g protractor npm ERR! Windows_NT 6.1.7601 npm ERR! argv "E:\\Software\\nodejs\\node.exe" "E:\\Software\\nodejs\\node_modul es\\npm\\bin\\npm-cli.js" "...
5
votes
2answers
2k views

Speeding up end-to-end tests

When we execute the same set of end-to-end browser-automated tests on BrowserStack, we notice a dramatic slowdown - tests are much slower than if executed locally and there are occasional failures ...
2
votes
1answer
282 views

Average protractor test script length?

Looking for protractor best practices of sorts, is there any recommended 'average' length or size of an individual end to end test? Our platforms features are all highly dependent upon on another so ...
5
votes
1answer
131 views

Test Quarantine in Protractor

Follow-up to How to deal with flaky tests? One of the approaches to tackle flaky tests is to temporarily quarantine the tests - move them to a special "bucket" with other flaky tests: I offer one ...
6
votes
2answers
1k views

Switching from JavaScript to TypeScript for Protractor e2e tests

Not very long time ago, Protractor itself migrated to TypeScript internally. I've also heard and seen several Protractor test projects moving to TypeScript. We have a rather big and growing test ...
7
votes
2answers
5k views

Organizing and maintaining protractor test files within multiple suites

I am just getting started with Protractor and inherited roughly 40 automated test cases. They are currently meant to run sequentially and are not organized or built to run independently. I am taking a ...
3
votes
1answer
359 views

Using Functional programming for UI Test automation

From what I have read about functional programming, it is considered to be more concise, more testable, and have fewer side effects. Would it be good to use for UI test automation? Context: I am ...
0
votes
1answer
237 views

How can I find text for span within span?

Following is my code: <span id="agText" class="ag-header-cell-text"> <span style="height: 100%;">Coordinator</span> </span> I was trying the following: var cordinator = ...
1
vote
3answers
1k 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> <!-...