End-to-end AngularJs testing using existing Selenium tests written in Java

Given a site with an existing extensive set of test cases written in Java using Selenium for a site and this site being rewritten in AngularJs, how can I combine Selenium tests into a new application?

I looked at Protractor , the new recommended end-to-end test runner that uses Selenium, however it seems to suggest this by writing a test in Javascript. In this article, we will talk in detail about how to configure this setting, but again, the tests are written in Javascript.

As much as I would like to write tests in Javascript, I would like to avoid rewriting, so it would be useful to get integrated ones from existing ones. Is there a configuration in Protractor that would allow this to happen?

+4
source share
1 answer

I am afraid that there is no good solution. There are many obstacles in your way.

  • The protractor is written in JavaScript and is a shell implementation of Selenium WebDriverJS. Given that WebDriverJS uses a completely different API than Java WebDriver (due to the asynchronous nature of the node), even if it is technically possible to get the node library to port the Java library, this will not work.
  • Selenium API, Java-, .
  • Angular, , , DOM .. . , Angular. , , . , .

, :

, Cucumber, , , , javascript cucumber-js, ( ) .

Java, , , javascript. № 2 , , № 3 , javascript LOE.

+1

Source: https://habr.com/ru/post/1526846/


All Articles