Cannot get Lebowski to work with SproutCore app inside iframe

11 views
Skip to first unread message

Gabe

unread,
Oct 7, 2011, 9:54:30 AM10/7/11
to lebowskifw
Hi,

The SproutCore application I'm testing is contained in an iframe and I
can't figure out how to get Lebowski/Selenium to access it.

The HTML looks something like this:

...
<div id="wrap">
<div id="contentwrap">
<div id="content">
<iframe src="/desktop" id="app" frameborder="0" height="100%"
width="100%">
**SproutCore App I want to test with Lebowski**
</iframe>
</div>
</div>
</div>
...

I've tried to use Selenium's select_frame() method to select the
iframe before starting the main application with Lebowski, but that
didn't seem to do anything.

Anyone have any ideas on what to do?

Thanks,
Gabe

Mike Jr

unread,
Oct 10, 2011, 11:24:44 AM10/10/11
to lebowskifw
Gabe,
Are you using SC.WebView ?

--Mike Jr.

MikeC

unread,
Oct 10, 2011, 1:45:50 PM10/10/11
to lebowskifw
Hey Gabe,

If you have a regular web page consisting of an iframe that holds your
SproutCore app, you won't be able to test it using Lebowski under such
conditions. Lebowski is designed to test a main SproutCore app when it
is loaded within the top-level window. However, once the main SC app
is loaded, you can then access content in frames that the app happens
to display.

Is there anything preventing you from testing your SC app outside of
the iframe?

-Mike

Gabe

unread,
Oct 12, 2011, 9:19:37 PM10/12/11
to lebowskifw
@Mike Jr: No, I'm not using SC.WebView. It's just a regular web page
with the SproutCore app inside an iframe.

@MikeC: The web page with the SproutCore app is loaded after
successfully logging in from a login page. I'm using Selenium to login
and it would be nice if I could use Lebowski to interact with the
SproutCore app after logging in. If this can't be done with the
iframe, then I'll have to talk with the developers and see if we can
get a version of the app without the iframe for testing.

Thanks for the replies,
Gabe

Gabe

unread,
Oct 14, 2011, 10:56:21 AM10/14/11
to lebowskifw
After discussing with my team, it looks like we're stuck with the
iframe and we can't test the SC app outside of the iframe. This is
because we want to test the app as it would be in production, which
includes loading the app within an iframe.

Is there anything else anyone can think of to get access to the SC app
with Lebowski in an iframe? Or would this require a change in the
Lebowski source code?

Thanks again,
Gabe

MikeC

unread,
Oct 14, 2011, 11:43:12 AM10/14/11
to lebowskifw
In order to access your SC app within the iframe, Lebowski's
implementation will have to be modified. Again, the current design of
Lebowski is to access a SC app from the top-level window. You can
access other SC app loaded within iframes in the main SC app.

Knowing that your SC app is part of your larger web site in
production, is there a reason why, at minimum, your SC app cannot be
tested outside of the containing iframe? Is it because the app makes
explicit references to the parent window or vise versa?

-Mike
Reply all
Reply to author
Forward
0 new messages