Hi jason!

I am glad to help you.
In fact,I think my selectFrame patch sucks in code way but it works.
I am always planning to write something about my modification to the core of
selenium and want somebody can refactor it.But I don't have enough time.
Below is my simple intro of selectFrame patch:

My thoughts about command selectFrame came from command selectWindow of 0.6.
Selenium records every popup in hash "browserbot.openedWindows[windowName]"
in overrided window.open.
Frame has property contentWindow so I think we can deal with frame in the
same way.

--selenium-browserbot.js--
In function BrowserBot.prototype.modifySeparateTestWindowToDetectPageLoads,
I add some code which adds onload listener to the frame to select in
function BrowserBot.prototype.callOnFramePageTransition which is in
user-extensions.js.
So all "ActionAndWait" in frame become work.

In function KonquerorBrowserBot.prototype.pollForLoad ,
I add "try...catch..." around the line "var sameDoc = (originalDocument ===
windowObject.document);".
The reason is because "permission denied" alert was always jumping out when
the page was changing in selected frame.When I chose not to debug the
error,selenium worked fine.
I thought when the page was changing,we couldn't access the document of
previous page which had been changed.I don't know how to work around it So I
add "try...catch..."

--selenium-excutionloop.js--
I add the expression "if (!this.waitForCondition)return;" because
waitForCondition maybe null when the current window is frame.

The intro above maybe too simple to understand the selectFrame patch.If you
have some question,pleas mail to me!

I will paste the into onto the wiki of selectFrame patch.
Good Luck!

James


----- Original Message ----- 
From: "jason scott gessner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 15, 2005 1$02 PM
Subject: selectFrame patch


Hi james!

I tried to integrate and test your selectFrame patch at the selenium
hackfest last night, but had quite a bit of trouble.
http://www.multiply.org/notebook/archives/2005/12/selenium_hackfe.html
The code looks good, but i need to clarify a few things with you.

Could you drop me a line so we could talk about the patch, how it
works for you, and maybe just some more background for it?

Thanks!

--
-jason scott gessner
    [EMAIL PROTECTED]

_______________________________________________
Selenium-devel mailing list
Selenium-devel@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel

Reply via email to