Hot answers tagged

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
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
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

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
5 votes

How does knowing the technology behind the system under test help in testing?

There's two types of testing in the context of your question: black box testing and white box testing. General issue A black box tester doesn't know anything about the system. This allows the tester ...
jmclaughlin'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

How to setup a Headless-Browser Unit-Test for Angular application?`

Angular has some great tooling for running tests, namely Karma and Protractor. By default (at least when using Angular CLI) they run using Chrome. So when you execute the tests from command-line, it ...
saif sadiq's user avatar
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
4 votes
Accepted

What to ask programmers before automating with Selenium

Agreeing on good element and attribute identifiers is essential with web applications. Identifying elements is done by developers, designers and automation programmers. In a traditional waterfall ...
Michael Durrant's user avatar
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

How to setup a Headless-Browser Unit-Test for Angular application?`

You just ask karma to run Chrome headless. It's no longer necessary to create it out of ChromeOptions Here are the first few lines from my karma.conf.js module.exports = function (config) { ...
Nathan Cooper's user avatar
4 votes
Accepted

Selenium for angular - How to install and run Selenium for Angular E2E testing?

Let's first wrap our heads around the definitions: a lot of different languages have selenium bindings. And JavaScript is no exception - WebDriverJS are javascript selenium bindings - a selenium ...
alecxe's user avatar
  • 11.4k
4 votes
Accepted

E2E test - Why does selenium shut down automatically after running the test?

Shutting Selenium is useful default for headless testing. I am not familiar with Protractor, but there should be a configuration parameter to keep browser open after run. And why you want browser to ...
Peter M. - stands for Monica's user avatar
4 votes

E2E test - Why does selenium shut down automatically after running the test?

When you are specifying seleniumServerJar and seleniumPort you are instructing protractor to take care of controlling a selenium server. Protractor would then start it as a child process before ...
alecxe's user avatar
  • 11.4k
3 votes
Accepted

How to unit test the plethora of js frameworks?

I have worked with a couple of JavaScript front-end frameworks (Angular, Ember and React) an all of them have their own tools to write (whitebox) tests. The (included) test frameworks let you render ...
Niels van Reijmersdal's user avatar
3 votes
Accepted

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

With the default config suggested in the tutorial, Protractor expects a selenium server at the 127.0.0.1:4444 address. And, I suspect, you have not started a selenium server. So, one way to approach ...
alecxe's user avatar
  • 11.4k
3 votes

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

HTML id is not the same as HTML name. It's common to have fields where the name and the id are different: <input id="user_name" name="inputName"> If you change your code to find the fields to ...
Kate Paulk's user avatar
  • 31.5k
3 votes

Selenium for angular - How to install and run Selenium for Angular E2E testing?

The tutorials on Protractor's site is pretty self-explanatory and assumes no webdriver experience. So there's no need to try to start with Selenium/WebdriverJs first. Another great thing with ...
HaC's user avatar
  • 220
3 votes
Accepted

Unable to run automated tests on the Vue version of the site

browser.waitForAngularEnabled(false); needs to be explicitly set in the spec/config files.
kylokyler's user avatar
  • 447
3 votes
Accepted

How to find radio button value and ID with xpath

It is difficult to suggest things without being able to test or check them, but, according to the information we have and taking into account that there could be multiple rhr-radio-button elements on ...
alecxe's user avatar
  • 11.4k
3 votes

Can Selenium handle Angular 7 applications?

With Selenium you can interact with web-browsers to drive web-applications. Angular7 result into web-applications, so yes it should be able to handle it. But, Angular has its own layer on top of ...
Niels van Reijmersdal's user avatar
3 votes
Accepted

Writing different tests for different environments

if it makes sense to write some environment-specific tests ? Absolutely! This is also frequently the job of smoke tests which basically assert that the latest deployment was successfull with very ...
Michael Durrant's user avatar
2 votes

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

Selenium WebDriver is a tool/library that enables automation, whereas Protractor is a Test Runner/Test Framework which defines the design/structure of the automation. If your tests are flaky, it might ...
Zeeshan S.'s user avatar
2 votes

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

You can just use plain Selenium for testing Angular applications. Protractor just makes it easier to test Angular application. Its a framework for testing Angular applications. It has Automatic ...
Niels van Reijmersdal's user avatar
2 votes

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

My guess will be that the creators of Protractor (which is the same team as AngularJS) just didn't want to switch languages for E2E testing, so they made effort to bring Selenium WebDriver to NodeJS.
GKalnytskyi's user avatar
2 votes

Nesting callbacks with protractor

There is no theoretical difference between the two options. In Protractor/WebDriverJS, there is always that active Control Flow mechanism which is a dynamic queue of promises that handles the ...
alecxe's user avatar
  • 11.4k
2 votes

Protractor tests run in parallel influence each other

This turned out to be a problem with the Browsersync settings in webpack config, not with browser instances. Setting ghostMode:false in the Browsersync settings section of the webpack config solved ...
mantisb's user avatar
  • 86
2 votes

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

It seems to be best practice to make the automated tests at the GUI level in the same language as the program under test is written in. Or at any level actually, it also applies at the API, business ...
Thunder's user avatar
  • 41
2 votes

Should I use Jasmine/FrisbyJS or Mocha/Chai for testing of live API with Angular?

1) If you're testing at the level of an http request your app's use of angular is almost certainly a non-factor. Angular would matter more were you testing at the browser level ("as a user" basically)....
Cherree's user avatar
  • 1,189
2 votes

Cypress vs Protractor for end-to-end testing

Go Agile. Try it in small incremental steps. I would at least give it a chance for initial prototype by making a quick smoke suite out of it and see from there how it goes and will take further ...
Vishal Aggarwal's user avatar

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