Watir chrome browser window in foreground

Discussion in 'Ruby' started by zak, Oct 11, 2012.

  1. zak

    zak Guest

    Hello!

    When I create an instance of Watir::Browser

    br = Watir::Browser.new :chrome, :profile => profile

    and for instance do some web crawling with it I have the problem, that
    the chrome window becomes the foreground window whenever a new url is
    loaded.

    This prevents me from working.
    So: Is it possible to keep the window in background or make it
    invisible?

    Thanks!
     
    zak, Oct 11, 2012
    #1
    1. Advertisements

  2. Take a look at the headless gem. Runs the browser with no window under
    Xvfb.

    Regards,
     
    Daniel Doherty, Nov 3, 2012
    #2
    1. Advertisements

  3. zak

    u.gotzes Guest

    Sounds good.
    Problem: I have to interact at a certain point.
    So "no window at all" is no solution.

    Thank you anyway
     
    u.gotzes, Nov 7, 2012
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.