Is there a limit on number of window redirects?

9 views
Skip to first unread message

sophiedmr

unread,
Aug 17, 2010, 12:58:26 PM8/17/10
to Windmill Developers
Running from python, I successfully log on and a new window comes up.

I call

client.setWindowByTitle(title=u'fastrac')

in my test and control passes to the new window with no problem.

I then click a button on this 2nd page which launches another window
but when I try to call
client.setWindowByTitle again with the 3rd page title it doesn't pass
the test control to this third window.

Any ideas?

Thankyou,
Sophie

Adam Christian

unread,
Aug 17, 2010, 5:33:35 PM8/17/10
to windmi...@googlegroups.com
This should work, however sometimes the timing causes the code to not re-inject that stuff.

Before you do the action that opens the new window you should call: 'overrideDialogs', which will inject the new window.open code.

The best way to check that the window registered is by using firebug in the IDE and looking at windmill.windowReg.

However with a couple of my use cases I have seen it continue to switch back to the previous window, which looks like a bug somewhere in the windmill.testWin() function. If you see that same behavior you can log a github bug and I will further investigate this.

Adam


--
You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
To post to this group, send email to windmi...@googlegroups.com.
To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/windmill-dev?hl=en.


sophiedmr

unread,
Aug 19, 2010, 9:53:42 AM8/19/10
to Windmill Developers
I still can't get this to work yet. Though I have come across another
problem with it when running a test from Python.
The 3rd windows displayed (should only be standard html), is
completely empty.
Also, the controls on the window I launch it from become disabled so I
have no option but to close down the application.

Something very strange is going on here as it works Ok when I run the
complete application within Windmill and use the Windmill IDE to click
the button to launch the window.
Is this something to do with the Windmill-Python Interface possibly?

Thanks

On Aug 17, 10:33 pm, Adam Christian <adam.christ...@gmail.com> wrote:
> This should work, however sometimes the timing causes the code to not
> re-inject that stuff.
>
> Before you do the action that opens the new window you should call:
> 'overrideDialogs', which will inject the new window.open code.
>
> The best way to check that the window registered is by using firebug in the
> IDE and looking at windmill.windowReg.
>
> However with a couple of my use cases I have seen it continue to switch back
> to the previous window, which looks like a bug somewhere in the
> windmill.testWin() function. If you see that same behavior you can log a
> github bug and I will further investigate this.
>
> Adam
>
> On Tue, Aug 17, 2010 at 9:58 AM, sophiedmr <
>
> sdemaletroquef...@datadiscoveries.com> wrote:
> > Running from python,  I successfully log on and a new window comes up.
>
> > I call
>
> > client.setWindowByTitle(title=u'fastrac')
>
> >  in my test and control passes to the new window with no problem.
>
> > I then click a button on this 2nd page which launches another window
> > but when I try  to call
> > client.setWindowByTitle again with the 3rd page title it doesn't pass
> > the test control to this third window.
>
> > Any ideas?
>
> > Thankyou,
> > Sophie
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Windmill Developers" group.
> > To post to this group, send email to windmi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > windmill-dev...@googlegroups.com<windmill-dev%2Bunsu...@googlegroups.com>
> > .

Adam Christian

unread,
Aug 19, 2010, 2:28:02 PM8/19/10
to windmi...@googlegroups.com
Are you getting errors on the command line from the proxy? Because I cant' seem the repro the broken HTML situation.

Adam

To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.

sophiedmr

unread,
Aug 25, 2010, 6:50:02 AM8/25/10
to Windmill Developers
Hi Adam,

I'm not getting any errors, but I think that the problem may be caused
by the following code that I am trying to test:

The new window is generated from an xslt transformation:
The resulting string from the xslt is then used to populate a blank
window as follows:

var str = zXslt.transformToText(oXmlDomReport, oXslDom);
// Open a blank browser
var reportwin = window.open('', '',
'menubar=yes,scrollbars=yes,toolbar=no,resizable=yes,statusno,location=no,width=550,height=600');
// Write the transformed XML to the window's document object
var newdoc = reportwin.document;
newdoc.write(str);
newdoc.close();
reportwin.focus();


Is this maybe something to do with the timing perhaps? I know that
the xslt transformation has worked as I put an alert statement into
the code to print out the resulting string and it looks OK. However,
when I view the source on the window it is empty.

Thanks,
> > > > windmill-dev...@googlegroups.com<windmill-dev%2Bunsubscribe@google­groups.com>
> > <windmill-dev%2Bunsu...@googlegroups.com<windmill-dev%252Bunsubscribe@g­ooglegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/windmill-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Windmill Developers" group.
> > To post to this group, send email to windmi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > windmill-dev...@googlegroups.com<windmill-dev%2Bunsubscribe@google­groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/windmill-dev?hl=en.- Hide quoted text -
>
> - Show quoted text -

sophiedmr

unread,
Aug 26, 2010, 3:51:05 AM8/26/10
to Windmill Developers
Also, The window is not being added to the window registry. How can
I ensure that it gets added to the registry?
Thanks.

On Aug 25, 11:50 am, sophiedmr <sdemaletroquef...@datadiscoveries.com>
wrote:
> Hi Adam,
>
> I'm not getting any errors, but I think that the problem may be caused
> by the following code that I am trying to test:
>
> The new window is generated from an xslt transformation:
> The resulting string from the xslt is then used to populate a blank
> window as follows:
>
>                 var str = zXslt.transformToText(oXmlDomReport, oXslDom);
>                 // Open a blank browser
>                 var reportwin = window.open('', '',
> 'menubar=yes,scrollbars=yes,toolbar=no,resizable=yes,statusno,location=no,w­idth=550,height=600');
> > >http://groups.google.com/group/windmill-dev?hl=en.-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Adam Christian

unread,
Aug 26, 2010, 4:43:34 AM8/26/10
to windmi...@googlegroups.com
Hi there, this whole feature is on my list to review/test/fix, ill get back to you as soon as I can.

Adam

To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.

sophiedmr

unread,
Oct 18, 2010, 9:43:36 AM10/18/10
to Windmill Developers
Adam,

Have you had a chance to look into this area at all?

Thanks,

Sophie
> > > > >http://groups.google.com/group/windmill-dev?hl=en.-Hidequoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Windmill Developers" group.
> > To post to this group, send email to windmi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > windmill-dev...@googlegroups.com<windmill-dev%2Bunsubscribe@google­groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/windmill-dev?hl=en.- Hide quoted text -

Adam Christian

unread,
Oct 23, 2010, 12:51:44 AM10/23/10
to windmi...@googlegroups.com
Hi Sophie,

Sorry for the delay -- sadly I haven't had a chance to work on this one yet, however I am moving up the backlog.

If you are interested in working on it, the way this works is that when a new page is loaded the open function is overwritten to call out to the windmill IDE and say, here is a pointer to this new window. It appears to work for the first level, but it appears that the re-writing of the open function is failing in the new windows. All of which is in windmill.js and I hope to get to debugging in about 3 or 4 critical fixes down the line.

Adam

> To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.

sophiedmr

unread,
Oct 25, 2010, 5:57:00 AM10/25/10
to Windmill Developers
Hi Adam,

I have started working on this one and managed to get the secondary
windows into the windows registry and pass control over to the new
windows.
I will pass it back over to you once I am happy with it.

Cheers,

Sophie
> >>>>>>http://groups.google.com/group/windmill-dev?hl=en.-Hidequotedtext -
>
> >>>>> - Show quoted text -- Hide quoted text -
>
> >>>> - Show quoted text -
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Windmill Developers" group.
> >>> To post to this group, send email to windmi...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> windmill-dev...@googlegroups.com<windmill-dev%2Bunsubscribe@google groups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/windmill-dev?hl=en.-Hide quoted text -
>
> >> - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
> > To post to this group, send email to windmi...@googlegroups.com.
> > To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/windmill-dev?hl=en.- Hide quoted text -

sophiedmr

unread,
Dec 20, 2010, 8:12:40 AM12/20/10
to Windmill Developers
Hi meant to get back to you on this.

Have just updated to windmill 1.4 so was having to put in my fixes to
the new version.
I got this working by adding the reWritePopups to the end of the
following:


this.setWindowByTitle = function(paramObject){
var title = paramObject.title;
var newW = windmill.testWin();
for (var i = 0; i < windmill.windowReg.length; i++)#
{
try
{
if (windmill.windowReg[i].document.title == title)
{
newW = windmill.windowReg[i];
found = true;
}
} catch(err)
{
// The window reference is no longer valid, remove it
windmill.windowReg.splice(i,i);
}
}
windmill.controller.reWritePopups();
windmill.testWindow = newW;


On Oct 25, 9:57 am, sophiedmr <sdemaletroquef...@datadiscoveries.com>
> > >>>http://groups.google.com/group/windmill-dev?hl=en.-Hidequoted text -
>
> > >> - Show quoted text -
>
> > > --
> > > You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
> > > To post to this group, send email to windmi...@googlegroups.com.
> > > To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/windmill-dev?hl=en.-Hide quoted text -

sophiedmr

unread,
Dec 20, 2010, 8:43:58 AM12/20/10
to Windmill Developers
Sorry should be:

windmill.controller.reWritePopups();
windmill.popup = newW;

in the above code

On Dec 20, 1:12 pm, sophiedmr <sdemaletroquef...@datadiscoveries.com>
wrote:
> > > >>>http://groups.google.com/group/windmill-dev?hl=en.-Hidequotedtext -
>
> > > >> - Show quoted text -
>
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
> > > > To post to this group, send email to windmi...@googlegroups.com.
> > > > To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
> > > > For more options, visit this group athttp://groups.google.com/group/windmill-dev?hl=en.-Hidequoted text -

Adam Christian

unread,
Dec 23, 2010, 4:17:10 PM12/23/10
to Windmill Developers
Hi Sophie, I would really like to pull your improvements into the
project, is there any change you can send me a working diff? Or a pull
request on github? Others have been complaining about this
functionality so I'm really excited to get it fixed and released in
1.5.

Thanks!

Adam

On Dec 20, 5:43 am, sophiedmr <sdemaletroquef...@datadiscoveries.com>
wrote:
> > > > >> - Show quoted text -
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "Windmill Developers" group.
> > > > > To post to this group, send email to windmi...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to windmill-dev...@googlegroups.com.
> > > > > For more options, visit this group athttp://groups.google.com/group/windmill-dev?hl=en.-Hidequotedtext -
Reply all
Reply to author
Forward
0 new messages