[Wtr-general] How to Kill session in Watir
Prakash Sattu
psattu at gmail.com
Fri Mar 31 12:13:35 EST 2006
Thank you very much Chris, let me try code
On 3/31/06, Chris McMahon <christopher.mcmahon at gmail.com> wrote:
>
> How to kill the
> > session so that if I run the test next time, it should suppose to ask
> for
> > username and password. Any help would be a great help.
>
>
> require 'win32ole'
> require 'watir' # the controller
> include Watir
> require 'Win32API'
>
> @ie = IE.new
> hWnd = @ie.ie.hWnd
> pid=" " * 32
> thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP',
> 'I').Call(hWnd,pid)
> fixnum_pid = pid.unpack("L")[0]
> puts fixnum_pid
> Process.kill( 9 , fixnum_pid)
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060331/f6c3c289/attachment.html
More information about the Wtr-general
mailing list