Manigandan
Manigandan

Reputation: 5082

How to call a WebDriver-Java code from the Protractor

Requirement: Having two applications one is an angular(Say as A) and other one is non-angular(Say as B) application. As of now both are Independent applications. In future we had a plan to integrate into one via SSO. For the non-angular application we have an automation suite and it is built upon Selenium WebDriver with Java on Page Object pattern. For the angular application we don't have any.Thought to go for Protractor.

Whatever I am doing in application A will be reflect in the application B in some milliseconds. To accomplish an e2e testing I need to verify the added values in application A in application B.

Problem: Am doing some actions on application A via Protractor and need to verify it on application B. Here comes the real problem, I need to re-use the code which is written on WebDriver-Java for the application B to verify and validate.

  1. Is it possible to call a WebDriver-Java code from Protractor?
  2. If Yes, can anyone please provide me outline of how to achieve it.
  3. Is there any other approaches to do it?

Upvotes: 0

Views: 518

Answers (1)

Rahul Vig
Rahul Vig

Reputation: 736

You can use spawn to run any external scripts/executables. You can expect certain conditions which can be read from a log for application B. Follow the link for more details-https://www.npmjs.com/package/superspawn

Upvotes: 0

Related Questions