Sunday, January 17, 2010

need to patch qooxdoo selenium plugin

qooxdoo consumed from end of my life once again. I tried to write a simple selenium test, and I got lost in a hopeless struggle to click on a button.

first of all, in order to write a selenium test for your qooxdoo application you need this plug-in. and also you need to use an old version of firefox and qooxdoo framework in order to use this plug-in.

as a conclusion, my struggle resulted with this patch, in this way it became possible to work with firefox 3 and qooxdoo 0.8.3.

but tests are not applicable to a built (. / generate build) qooxdoo application, and it's not nice to be have to put test specific setUserData method calls into your application.

I don't know how long my struggle with qooxdoo will go on.


Erhan Kesken said...

by the way, i should write the semptoms of the problem, so people experiencing same problem can find this entry:

first, you will see the following errors:

qx-Locator: qx-Object not defined. inWindow = [object XPCNativeWrapper [object Window]], inWindow.qx = undefined

a security precaution of firefox 3 causes this problem. the cure is replacing "inWindow.qx" 's with "inWindow.wrappedJSObject.qx" 's.

then you'll get this error:

Unexpected Exception: message -> is undefined inWindow.wrappedJSObject.qx.ui.core.ClientDocument

and it's cure is replacing;

"qxResultObject = inWindow.qx.ui.core.ClientDocument.getInstance ();"

line with

"qxResultObject = inWindow.wrappedJSObject.qx.core.Init.getApplication (). getRoot ();"

and also your qooxdoo application must be standalone.

next error you'll see is:

Unexpected Exception: message -> qxResultObject.getElement is not a function

replace "qxObject.getElement ()" 's with "qxObject.getContentElement (). getDomElement ()".

and finally the last error:

[error] Unexpected Exception: message -> qxResultObject.getElement is not a function

replace "qxResultObject.getElement ()" 's with "qxResultObject.getContentElement (). getDomElement ()".

that's it.

Erhan Kesken said...

if you'll get selenium extension from svn, you'll not experience most of the problems mentioned above, but you'll still have to do some changes as I remember.

since this entry, qooxdoo 1.0 is released, actually I don't know the last state of extension.

Mary Hickman said...

great blog post.

Cheap SEO Packages

for IT the said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai