22 votes

Why can't we use Selenium Webdriver to test Angular JS sites?

I do use Webdriver to use Angular pages. So it IS possible, and OP's assumption is wrong. But it is not easy - not as straightforward as using WebDriver to automate more traditional web pages (which ...
Peter M. - stands for Monica's user avatar
14 votes
Accepted

Moving from Selenium to Protractor

Adding couple notes to Niels's great answer. Protractor wraps WebDriverJS which is Javascript Selenium bindings - in other words, Protractor does interact with a browser through the Selenium ...
alecxe's user avatar
  • 11.4k
13 votes

Moving from Selenium to Protractor

Protractor is Selenium, but then integrated with tooling and helper methods. If you know programming and Selenium it should be relative easy to pick up. Protractor is an end-to-end test framework ...
Niels van Reijmersdal's user avatar
9 votes
Accepted

Data driven testing using csv in Protractor

Hi i found another csv module : csv-parse : https://csv.js.org/parse/ (Its used in postman) const parse = require('csv-parse/lib/sync'); Use this module for data-driven testing instead of below-step ...
PDHide's user avatar
  • 11k
8 votes
Accepted

Speeding up end-to-end tests

I discovered the following points while speeding up my protractor(selenium) tests: Run tests in a headless browser(from version 59, chrome can be run headless natively) Run tests as direct ...
Vishal Aggarwal's user avatar
8 votes

Moving from Selenium to Protractor

I followed the below transition process myself successfully: Learned basic JavaScript, including basic constructs like variables, loops, conditions, functions. Learned advanced JavaScript, ...
Vishal Aggarwal's user avatar
8 votes

Is it a good idea for a Developer to review a tester's code

It's an okay idea with some guidelines. QA code is software. And software engineering principles should still apply. Since none of the developers know protractor, they should be trained. They may ...
newsn31's user avatar
  • 609
7 votes
Accepted

Organizing and maintaining protractor test files within multiple suites

I think you've got it wrong. Organizing test specs into suites in Protractor does not mean you need to copy the file and keep multiple versions of the same file. Instead, suites is simply a ...
alecxe's user avatar
  • 11.4k
7 votes
Accepted

How should I find the XPath using selenium webdriver and protractor

Avoid the use of 'Absolute XPath' if possible in your coding. If your element is having with class, ID, name & Type attributes then try to locate the element with the use of Relative XPath. You ...
Bharat Mane's user avatar
  • 6,785
6 votes

Why can't we use Selenium Webdriver to test Angular JS sites?

Hammer vs. Screwdriver Yes, it is possible but highly inefficient with full of hard coded waits! Which is better, a hammer or a screwdriver on a screw? One may always use a hammer on a nail but if you ...
Vishal Aggarwal's user avatar
6 votes
Accepted

Cypress vs Protractor for end-to-end testing

Open source: Cypress.IO looks promising, but I have been holding off with starting to use it on a production project. My main reason that it is a commercial company and I cannot be sure they keep ...
Niels van Reijmersdal's user avatar
6 votes

Cypress vs Protractor for end-to-end testing

Open Source: I am a developer at Cypress.io. Cypress recently released its public beta and is now open source. The code for it's core product, the Test Runner can be found here. The Cypress ...
Jennifer Shehane's user avatar
6 votes

Can Jasmine tests be executed in a specific order?

On Jasmine 3.x, random order is the default behavior. To run in order file written order, you can specify --random=false or use a seed. Docs: https://jasmine.github.io/api/3.3/Configuration.html
João Farias's user avatar
  • 10.5k
5 votes
Accepted

Why should we use javascript for UI test automation?

Yes - For Unit Testing Javascript I've been working with this concept over the last few years and I've come to the following, multi-tier approach: Unit testing on the backend. For example with Ruby ...
Michael Durrant's user avatar
5 votes
Accepted

Switching from JavaScript to TypeScript for Protractor e2e tests

The nice thing of TypeScript you do not have to migrate at once. TypeScript is a superset and can parse plain JavaScript as well. You can keep your old code and start using TypeScript for new code or ...
Niels van Reijmersdal's user avatar
5 votes
Accepted

End-to-end tests are running for 5 hours

A few things to consider come to mind: Only run in Chrome Controversial huh? Let me explain more fully though. My question for multi-browser and indeed multi-device (responsive web sites) testing ...
Michael Durrant's user avatar
5 votes
Accepted

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

As an aside, although I will want to test the 'log in' capability too, is there a way to 'skip' this during testing, so that I can run the tests on all of the features of the app, without Protractor ...
alecxe's user avatar
  • 11.4k
5 votes
Accepted

How to interact with ngx-monaco-editor

If you are not sure about the locator then you can use the action class sendKeys method to interact with the field. Here, it interacts with the active (currently focused ) element. So the first step ...
PDHide's user avatar
  • 11k
5 votes
Accepted

How to open Edge browser in protractor for edgeHTML version 18

Goto EDGE > setting and scroll down: Here note the edge html version , that is the version for which we have to download the driver for. The below command (for downloading webdriver for edge html ...
PDHide's user avatar
  • 11k
4 votes
Accepted

Creating negative automation test scripts

In my opinion you should not mix positive and negative paths because every test has to be independent and give a clear result. Suppose that you create 100 scripts both positive and negative and all ...
Luca Giuffrida's user avatar
4 votes

How to clear a directory before running Protractor tests

You just need to remove all files in the "Downloads" directory inside the onPrepare() function which you define inside your Protractor configuration file. Let's use the synchronous rmDir function ...
alecxe's user avatar
  • 11.4k
4 votes

Why should we use javascript for UI test automation?

We have recently started with writing WebDriver tests in JavaScript and I have to agree that the asynchronous execution is adding an unneeded complexity. Pro's: Same test-runner as other (front-end) ...
Niels van Reijmersdal's user avatar
4 votes

Why should we use javascript for UI test automation?

As you mention, the asynchronous chaining API seen in "selenium-webdriver" NPM package and also in nightwatch, protractor, testcafe, cypress, intern and wd.js etc can be quite hard to understand. ...
molsson's user avatar
  • 141
4 votes

How to profile end-to-end tests to find the slow ones?

From your test framework or from logs, first identify the slow ones. Debug each test (single stepping) to determine which area is slowest. Identify if it's client or host related, backend, frontend,...
John Peters's user avatar
4 votes

Switching from JavaScript to TypeScript for Protractor e2e tests

NO. I would not suggest doing so until you have a specific objective to be met by doing it. In my opinion, its only worth the effort if you are working on large development project but for ...
Vishal Aggarwal's user avatar
4 votes

How should I find the XPath using selenium webdriver and protractor

An absolute XPath should start with a slash /: '/html/body/div[2]/div[1]/div/div[1]'. It is advised to use relative XPath like: '//div[@id="portfolioName"]'. For this to work, the id has to be ...
Patrick's user avatar
  • 152
4 votes

How should I find the XPath using selenium webdriver and protractor

Say "No" to XPaths, to quote the Protractor style guide: It's the slowest and most brittle locator strategy of all Markup is very easily subject to change and therefore xpath locators ...
alecxe's user avatar
  • 11.4k
4 votes
Accepted

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

Generally speaking, you are doing end-to-end testing with Protractor. End-to-end testing with Protractor/Selenium typically tries to simulate the user actions and behaviors in the browser, staying on ...
alecxe's user avatar
  • 11.4k
4 votes
Accepted

Correct Strategy for Element to be not present in DOM

After a long hard fought battle, I was able to overcome this using opposite of what K-8 had suggested. Instead of checking if an element is visible on the viewport, I checked the negative of that, ...
demouser123's user avatar
  • 3,532

Only top scored, non community-wiki answers of a minimum length are eligible