0
votes

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?
1
If you know about WebDriverJS. Then it will be really familiar for you to work with in Protractor you can call it through browser global object. ---- For example: WebElement findElement(By by) of Java is equivalent with browser.findElement(by.css('.something')) of JS in Protractor. angular.github.io/protractor/#/webdriver-vs-protractor - Linh Pham
@Linh: Thanks for the response. Think you misunderstood my question. WebDriver-Java code is already there in the code base. Need to use those code from the protractor files. Say like need to call those Java methods to do some actions along with my Protractor line of codes. - Manigandan

1 Answers

0
votes

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