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 ...
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 ...
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 ...
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 ...
user avatar
  • 10.8k
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 ...
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, ...
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 ...
user avatar
  • 589
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 ...
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 ...
user avatar
  • 6,749
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 ...
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 ...
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 ...
user avatar
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 ...
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 ...
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 ...
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 ...
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 ...
user avatar
  • 10.8k
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 ...
user avatar
  • 10.8k
4 votes

Coded UI vs Protractor

If it is an Angular application I would go for Protractor EDIT: Protractor was made for Angular Apps. You don't have deal with elements not being visible yet due to page loads. Protractors deals ...
user avatar
  • 193
4 votes

Creating negative automation test scripts

The trade-off is between script length and diagnostic value: Script length: one script with everything in it may be shorter (and should never be longer) than a positive script plus a negative script, ...
user avatar
  • 22.8k
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 ...
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 ...
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) ...
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. ...
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,...
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 ...
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 ...
user avatar
  • 157
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 ...
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 ...
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, ...
user avatar
  • 3,520

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