How to handle authentication pop-up when the machine is lock

Discussion in 'Ruby' started by Parul Korea, Sep 20, 2010.

  1. Parul Korea

    Parul Korea Guest

    I am facing issues while handling authentication pop-up when my machine
    is locked.
    I have scheduled my ruby script to run at a particular time. The script
    does not get executed when it encounters an authentication pop-up.
    Authentication pop-up stays idle.
    Below is the peace of code which I am using. The same code works fine
    when the machine is not locked.

    require 'watir'
    require 'ci/reporter/rake/test_unit_loader.rb'
    require 'test/unit'
    require 'watir/close_all'
    require 'test/unit/ui/console/testrunner'
    require 'test/unit/ui/reporter'
    require 'fileutils'
    include FileUtils::Verbose
    require 'stringio'
    require 'watir/WindowHelper'

    class TestSuite_authentication < Test::Unit::TestCase
    def setup
    @url = 'stage.remotedonationtest.networkforgood.org'
    @login_title = "Connect to #{@url}"

    @username = 'abc\test'
    @password = 'testpassword'

    end

    def test_logon
    a = Thread.new {
    system("ruby handle_logon.rb \"#{@login_title}\" \"#{@username}\"
    \"#{@password}\"")
    }

    $ie = Watir::IE.start(@url)
    #~ $ie.goto('stage.remotedonationtest.networkforgood.org')

    a.join


    # continue code here...

    end

    end
    --
    Posted via http://www.ruby-forum.com/.
     
    Parul Korea, Sep 20, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    8,568
    Randy Webb
    Feb 4, 2006
  2. Fuzzyman
    Replies:
    3
    Views:
    511
    Andrew MacIntyre
    Dec 5, 2003
  3. Robert Brewer
    Replies:
    0
    Views:
    501
    Robert Brewer
    Dec 5, 2003
  4. k3xji
    Replies:
    7
    Views:
    850
    Gabriel Genellina
    Dec 30, 2008
  5. nano2k

    Application.Lock()/UnLock() or lock(Application)

    nano2k, Jul 23, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    300
    nano2k
    Aug 9, 2007
Loading...

Share This Page