sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29518
Re: [Question #258406]: How to handle a Firefox session on Windows
Question #258406 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/258406
RaiMan proposed the following answer:
Thanks for kind feedback.
The stuff I sent you is far from being perfect. Was only some quick and
dirty approach based on my experiences with handling FF sessions.
--- the 3
... takes care, that FF at startup gets max 3 seconds time to produce a window(0).
(the loop runs max 3 times and internally waits 1 second if no window(0))
This value might have to be adjusted on slower machines or might be reduced on faster ones
--- the 100
... is an arbitrary value, that should not be reached in real.
We need the loop, since currently Sikuli does not have a feature, to ask an application about the number of windows it has.
so we check the window(n), until it is None.
--- against 200
... this skips the case of minimized windows, which are not handled in this workflow.
Minimized windows in the above loop show up as regions (-32000, -32000) 160x14, which makes them invisible/not accessible
Try it: open 2 FF windows and minimize them. Then run the workflow and watch the error messages.
Depending on your FF settings you might even run into problems with the current workflow (warning to close a window with multiple tabs, which is not handled).
Might be a good exercise, to find a way to handle these minimized
windows when running ffStop()
Happy scripting
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.