Robin Becker wrote:
I have a test which opens a PDF document and this sometimes seems to
halt the test run. The document is opend in the test pane, but the tests
seem to stop.
Is there a way round this?
didn't receive any hints on this so decided to do a delayed back function like
this in my user-extensions.js
var _delayedTimeout={};
Selenium.prototype.doDelayedGoBack=function(timeout,t){
var p=this.page(),e;
if(!t) t = 't'+(new Date()).getTime();
e = _delayedTimeout[t]={f:function(t){
delete _delayedTimeout[t];
p.goBack();
}}
e.to=window.setTimeout('_delayedTimeout["'+t+'"].f("'+t+'")',timeout);
}
Selenium.prototype.doClearDelayedGoBack=function(t){
if(_delayedTimeout[t]){
window.clearTimeout(_delayedTimeout[t].to);
delete _delayedTimeout[t];
this.page().goBack();
}
}
then in my script I tried this
delayedGoBack|4000|output
open|/path2/my.pdf|
clearDelayedGoBack|output|
this seems to work fine.
--
Robin Becker
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users