GithubHelp home page GithubHelp logo

Comments (2)

DrMarcII avatar DrMarcII commented on June 2, 2024

This is a complicated question and depends on what features of Protractor you are trying to get. From my perspective as a non-Protractor user, Protractor appears to provide 3 features:

  1. Test execution and browser provisioning. This is directly replaced by the features provided by web test launcher, so can be safely ignored.

  2. Automatic waiting for Angular App quiescence (e.g. making sure that all pending Angular actions have completed before executing WebDriver commands). Originally this was implemented by the Protractor wrappers around WebDriverJS using Execute Script. More recently, I believe that this uses a WebDriver proxy. It is possible to create a Driver Session Handler Func that would recreate the logic used in Protractor's proxy (we actually do this in Google).

  3. Provide wrappers around WebDriverJS for Angular specific functionality. This includes things like installing replacement modules (at least with AngularJS 1, not sure if this moved forward for any versions of Angular2), locating elements by binding, and probably others. These depend on being able to run NodeJS-based tests. Currently there doesn't appear to be Bazel.build-recommended NodeJS rules, so I am not ready to add a version of the webtest API for NodeJS to rules_webtesting yet. That said, creating an implementation of such an API is fairly simple (mostly you just have to look at the value of the WEB_TEST_WEBDRIVER_SERVER environment variable, and use that as the address of the Remote Selenium Server when constructing a Remote WebDriver instance in the language of your choice.

from rules_webtesting.

mrmeku avatar mrmeku commented on June 2, 2024

Just to follow up on this I think that so long as we achieve goal #2 above we should be fine. Protractor dropped support for adding mock modules with Angular 2 and no one really cares about testing against AngularJS nowadays.

In #3 you mentioned that there is not a bazel_build approved set of nodejs rules, but I wanted to let you know that there is one (https://github.com/bazelbuild/rules_nodejs). I doubt that we'll need to go as deeply into #3 as you indicated but at the very least we will need to have protractor tests be run with NodeJS since thats by and large the majority use case of protractor testing. So I think the only real step we need to accomplish here is constructing a remote webdriver instance and passing that instance to protractor

from rules_webtesting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.