angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

Targeting iframe elements nested within angular app #1528

Closed cathalmcguire closed 9 years ago

cathalmcguire commented 9 years ago

Login for my app is an external iframe. For some of my e2e tests I require a user to be logged in. I'm trying to create a login function but can't target the ifame inputs. I've tried switching frame:

ptor.switchTo().frame('loginIframe'); element(by.id('username')).sendKeys(username);

but getting the error:

Error: Error while waiting for Protractor to sync with the page: {"message":"angular is not defined"....

I'm guess that because the iframe isn't an angular feature protractor falls over. Is there a workaround for this? Since protractor is built on webdriver can I use webdriver to target?

juliemr commented 9 years ago

Please read the contributing guidelines; these types of questions are ill-suited for GitHub. Thanks!