Sync Protractor with an Angular app hosted inside an iframe by a non-Angular website
NickName:Pablo Ask DateTime:2015-06-02T21:40:15

Sync Protractor with an Angular app hosted inside an iframe by a non-Angular website

I'm having trouble accessing elements via methods such as by.binding().

The project setup is as follows:

Non-angular website
|
--> Iframe
    |
    --> Angular app

Here's a snippet of what I'm trying to do:

// Disable sync
browser.ignoreSynchronization = true;

// Navigate to non-angular website
browser.driver.get('http://non-angular.com');

// Switch to angular app (inside the iframe)
browser.switchTo().frame('angular-iframe');

// Search for an element
browser.driver.findElement(by.id('title')); // -> Works

element(by.binding('model.title')); // -> Fails 
UnknownError: unknown error: [ng:test] no injector found for element argument to getTestability

Any idea of what I'm missing here?

Copyright Notice:Content Author:「Pablo」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30597802/sync-protractor-with-an-angular-app-hosted-inside-an-iframe-by-a-non-angular-web

More about “Sync Protractor with an Angular app hosted inside an iframe by a non-Angular website” related questions

Sync Protractor with an Angular app hosted inside an iframe by a non-Angular website

I'm having trouble accessing elements via methods such as by.binding(). The project setup is as follows: Non-angular website | --> Iframe | --> Angular app Here's a snippet of what

Show Detail

Testing Angular app with Protractor inside iframe hosted by non-Angular app?

In the process of migrating a legacy app to Angular we have a setup where the legacy app loads the new up in an iframe. We want to test this integration with Protractor. The legacy app is not an An...

Show Detail

Protractor: Testing non-Angular App in an Iframe

I'm writing e2e tests for my non-angular app, using protractor Version 3.3.0. My app loads another non-Angular App inside an iframe, and i'm trying to write tests to the iframed-in with Protractor....

Show Detail

testing non-angular app with protractor and webdriver fundamentals

I am writing e2e tests for a non-angular app using protractor and while there is quite a bit of information on how to accomplish this, it seems there are many different ways and so I have some

Show Detail

Protractor - switching from non-angular to angular page: "Error while waiting for Protractor to sync with the page"

I'm using Protractor to test an app consisting of 3 components: OpenAM non-angular login component, Non-angular app component, Angular app component. First, I login using the OpenAM component. Be...

Show Detail

Protractor throwing exception in synchronization between angular and non-angular

We are developing a protractor jasmine framework for testing the angular part of our application. When we run the script the protractor switches from non-angular to angular without any problem, how...

Show Detail

Not able to navigate from Non-angular page to angular page in iframe

I am trying to automate angular app with in the facebook. I am able to successfully login to facebook, but whenever i try to navigate to the angular page within the iframe, it keeps kicking me out ...

Show Detail

Multiple timeouts using Protractor with Angular Non-Angular website

Hi I am working on an app that has a non-angular interface and new modules with angular on it. It is in a transition phase. I was trying to use protractor for my tests, but some require to be logge...

Show Detail

Alternativa to Protractor for NON-angular project

I need to find the best testing tool for automation of front end in NON-angular project. I was told that Protractor has a bad performance for non-angular testing and was advised to use Puppeteer. H...

Show Detail

Protractor test from non-angular login page

I am trying to test a basic login/logout from my site. the entry point to my angular app is from a non-angular login page (oauth), which then serves the app after credentials have been validated. M...

Show Detail