0

So I have a page that has a frame, and in that frame another view. How do locate the elements inside the view and test it? I know how to access that frame, just locating the view after that is pretty confusing.

my problem looks similar to this: How do I locate elements in protractor that are in other views and are not visible when viewing page source

Community
  • 1
  • 1
kennanwho
  • 171
  • 1
  • 3
  • 14

1 Answers1

0

After you switch to the frame, locate the elements in the view the same way you do it in the main content of the document:

browser.switchTo().frame("frame_name_or_id");
var view = element(by.css("div[ui-view]"));
view.element(by.id("some_element_id")).click();
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • Hi. so I can locate the view now, when when I try to click an element inside it, it says 'Cannot read property "click" of undefined'. – kennanwho Mar 23 '16 at 17:38
  • 1
    @123457890 I suspect there is a problem in your actual code. Could you show what are you executing? – alecxe Mar 23 '16 at 17:38
  • this is working. typo error on my end that's why it didn't work! thank you so much! :D – kennanwho Mar 23 '16 at 17:44