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


in process of migrating legacy app angular have setup legacy app loads new in iframe. want test integration protractor. legacy app not angular app.

we'd able test if legacy app had angular, doesn't, protractor has trouble switching context iframe angular app lives.

how should done?

edit: protractor fails follows.

after iframe comes , doing

browser.switchto().frame(...); 

protractor unable find controls inside iframe. we've tested case outside iframe , protractor finds buttons , links , fields fine in angular app. when same page loaded in iframe acts though weren't there.

once had similar situation, upside down - there non-angular page opened on click:

i hope same idea work here also. set ignoresynchronization false right before switching frame. set ignoresynchronization true in aftereach() function:

browser.ignoresynchronization = false; // switch frame 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -