0

I am attempting to write an automation test on an Angular page that is using frames. I need to drill into the iframe to interact with the elements however have no access to the html. If I use the firefox firebug 'inspect angular scope' addon I can drill into the DOM of the frame and see the elements i need to interact with. The problem is I am yet to locate elements anywhere else outside the html as I'm pretty knew to automation and fresh out of college. Does anyone know where i can start? I am the only automation engineer and no one in my company has been able to assist me in this task. Regards!

Nicole Phillips
  • 753
  • 1
  • 18
  • 41
  • In all of the major browsers you should be able to right-click on the page and choose Inspect Element (or something similar) and see the underlying HTML. Also, all of the major browsers have a developer tools pane available by pushing the F12 key on your keyboard, or by opening it from the menu. That should get you what you need. – MBielski Nov 05 '15 at 17:29
  • @Mbielski right click is disabled inside the frame. :/ – Nicole Phillips Nov 05 '15 at 17:36
  • Ah yes, I have a similar application right now. Open the developer pane and go to the HTML tab. It should highlight (or give the option to turn highlighting on) the element that you are hovering over with the mouse. I highly recommend Chrome for this. Using that, you should be able to drill down into the HTML anywhere on the page, including the iframe and the contents thereof. – MBielski Nov 05 '15 at 17:41
  • @MBielski it highlights the frame entirely. Picture this is you can. the app is much like a drawing canvas. I click an object outside the frame to place it into the iframe. When I click and drag the object and release it into the frame the frame sucks it in and is no longer view-able in the html. I can use angular scope to scope to the frame but cannot use scope to get to an object inside the frame. – Nicole Phillips Nov 05 '15 at 17:48
  • 1
    Can you share a link to the page? – JeffC Nov 06 '15 at 04:22

1 Answers1

0

You don't share anything (your code, html dom, etc) so my response will be approximative.

You maybe don't focus your findElement on the good frame. How to switch between frames in Selenium WebDriver using Java

Sometimes, the webdriver can't recognize dynamic content. What i suggest is to try to wait the element : selenium2 webdriver can't find the element newly created by javascript

And if it does not work, you can try to refresh the frame/page by sending a form.

It's tricky but it works.

Tell me what's up.

Community
  • 1
  • 1
e1che
  • 1,241
  • 1
  • 17
  • 34