selenium and ext-js

3 replies [Last post]
instant
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 07/16/2010

Hi. I'm just wondering if there is any information/documentation on how Selenium (which we believe is used in the CBT screenshot technology) interacts with ExtJS, as our website www.instantoffices.com utilises the latter.

I have taken some screenshots, and particularly in Safari the status bar says that not all page elements have loaded. However, during actual testing on personal computers in our office, there are no issues with Safari and incomplete page loads, though I realise this is not scientific.

So in short, would extJS have any effect on incomplete page loads reported in Safari?

ken
ken's picture
User offline. Last seen 1 hour 53 min ago. Offline
Joined: 01/29/2008
You may want to try adding a

You may want to try adding a delay before the screenshot is taken - this may give the page time to load fully. We have a blog post that explains how to set this - it is buried under the 'advanced' option. Take a look at http://crossbrowsertesting.com/blog/new-feature-add-delay-your-screenshots and let us know if this helps or not.
Thanks
Ken

instant
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 07/16/2010
without delay

I'm more interested to find out the technology i.e. without setting the delay. Is there any documentation on selenium as used by CBT (especially when interacting with EXT-JS), or alternatively when it "thinks" the page has loaded?

ken
ken's picture
User offline. Last seen 1 hour 53 min ago. Offline
Joined: 01/29/2008
We are currently using

We are currently using Selenium 1.0 beta 2, driving it via python, during the screenshot process. We set a pretty long timeout, then call the open command, ie:

sel.set_timeout(60000)
sel.open("http://yoursite.com")

The Selenium documentation is pretty sparse on exactly what occurs here - ie how does it know when it is ready. Here is what it has on the open command (from http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/doc/pyt...):
=====================================================================================
open(self, url)

Opens an URL in the test frame. This accepts both relative and absolute URLs.

The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit.

Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain.

'url' is the URL to open; may be relative or absolute
=====================================================================================

In my check, I did not see a lot more information about exactly how the open command knows it is ready. All source code for Selenium is open source, so if you were to dig through the code you should be able to find the specific method it is using. I did a couple of quick searches and did not see any additional areas to point you to on this.

Thanks
Ken