Relocate firefox-instances that are opened by a background task (selenium/webdriver)

79 views
Skip to first unread message

fwo...@googlemail.com

unread,
May 27, 2013, 8:25:23 AM5/27/13
to devil...@googlegroups.com
Hi, placing a new firefox window on a certain workspace works fine as long as I open them manually. However, when they are spawned by my selenium test suite - it doesn't. Is this supported at all?
Thanks in advance, Frank

Andreas Rönnquist

unread,
May 27, 2013, 8:35:16 AM5/27/13
to devil...@googlegroups.com
> --

How do you identify that it is a Firefox window? It might be that it
uses another title on the window when it is spawned from selenium, and
your match doesn't work because of this.


-- Andreas Rönnquist
gus...@gusnan.se

fwo...@googlemail.com

unread,
May 27, 2013, 9:04:49 AM5/27/13
to devil...@googlegroups.com
xlsclients shows no difference in the "Name" - regardless whether I start it manually or via selenium:

➜ xlsclients -l | grep -C4 -i firefox
Window 0x2e00001:
  Machine:  development.vagrant
  Name:  Firefox
  Icon Name:  firefox
  Command:  firefox
  Instance/Class:  firefox/Firefox

the script would be:

if (get_application_name()=="Firefox") then
  set_window_workspace(4);
end
Reply all
Reply to author
Forward
0 new messages