[wtr-general] Re: How to get firefox window handle
Hi Angrez, Where can i get documentation for the same. I don't know how to get title of the window using Win32API. Regards, Kiran Y On Fri, Jul 10, 2009 at 2:44 PM, Angrez Singh ang...@gmail.com wrote: Right now there is no support for hwnd in Firewatir. Can you use Win32API to get the handle of the window using the title? If yes, then you can use firefox title to get the handle. - Angrez On Fri, Jul 10, 2009 at 2:35 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hi Angrez, Thanks for your reply. Following is the step which I want to perform. Want to click on the center point of the firefox window and want to do some copy paste operation. This is required as I can't set text in the frame as body of compose window in my project had used frame. In IE following is the piece of code I was using def getClientCenterPoint(browser) myRect= * 16# store four LONGs getClientRect=Win32API.new(user32, GetClientRect, ['I','P'], 'I') getClientRect = Win32API.new('user32', 'FindWindowEx', ['P'] * 4, 'L') getClientRect.call(browser.hwnd, myRect) x,y,xpos,ypos=myRect.unpack() setCursorPos = Win32API.new(user32, SetCursorPos, ['I','I'], 'I') setCursorPos.Call(xpos.to_i/2+90,ypos.to_i/2+150) end Please let me know if you want any other details. Regards, Kinnu On Fri, Jul 10, 2009 at 1:33 PM, Angrez Singh ang...@gmail.com wrote: can you explain what you are trying to do by getting the handle of window? may be we can suggest some workaround to do the same in Firewatir? - Angrez On Fri, Jul 10, 2009 at 1:03 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.comwrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to get firefox window handle
You can look into winhelper.rb file in watir framework. It uses win32api for lot of things. I haven't used win32api so will not be able to help you much with the code. Thanks, Angrez On Tue, Jul 14, 2009 at 1:16 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hi Angrez, Where can i get documentation for the same. I don't know how to get title of the window using Win32API. Regards, Kiran Y On Fri, Jul 10, 2009 at 2:44 PM, Angrez Singh ang...@gmail.com wrote: Right now there is no support for hwnd in Firewatir. Can you use Win32API to get the handle of the window using the title? If yes, then you can use firefox title to get the handle. - Angrez On Fri, Jul 10, 2009 at 2:35 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hi Angrez, Thanks for your reply. Following is the step which I want to perform. Want to click on the center point of the firefox window and want to do some copy paste operation. This is required as I can't set text in the frame as body of compose window in my project had used frame. In IE following is the piece of code I was using def getClientCenterPoint(browser) myRect= * 16# store four LONGs getClientRect=Win32API.new(user32, GetClientRect, ['I','P'], 'I') getClientRect = Win32API.new('user32', 'FindWindowEx', ['P'] * 4, 'L') getClientRect.call(browser.hwnd, myRect) x,y,xpos,ypos=myRect.unpack() setCursorPos = Win32API.new(user32, SetCursorPos, ['I','I'], 'I') setCursorPos.Call(xpos.to_i/2+90,ypos.to_i/2+150) end Please let me know if you want any other details. Regards, Kinnu On Fri, Jul 10, 2009 at 1:33 PM, Angrez Singh ang...@gmail.com wrote: can you explain what you are trying to do by getting the handle of window? may be we can suggest some workaround to do the same in Firewatir? - Angrez On Fri, Jul 10, 2009 at 1:03 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.comwrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to get firefox window handle
Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.com wrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to get firefox window handle
can you explain what you are trying to do by getting the handle of window? may be we can suggest some workaround to do the same in Firewatir? - Angrez On Fri, Jul 10, 2009 at 1:03 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.com wrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to get firefox window handle
Hi Angrez, Thanks for your reply. Following is the step which I want to perform. Want to click on the center point of the firefox window and want to do some copy paste operation. This is required as I can't set text in the frame as body of compose window in my project had used frame. In IE following is the piece of code I was using def getClientCenterPoint(browser) myRect= * 16# store four LONGs getClientRect=Win32API.new(user32, GetClientRect, ['I','P'], 'I') getClientRect = Win32API.new('user32', 'FindWindowEx', ['P'] * 4, 'L') getClientRect.call(browser.hwnd, myRect) x,y,xpos,ypos=myRect.unpack() setCursorPos = Win32API.new(user32, SetCursorPos, ['I','I'], 'I') setCursorPos.Call(xpos.to_i/2+90,ypos.to_i/2+150) end Please let me know if you want any other details. Regards, Kinnu On Fri, Jul 10, 2009 at 1:33 PM, Angrez Singh ang...@gmail.com wrote: can you explain what you are trying to do by getting the handle of window? may be we can suggest some workaround to do the same in Firewatir? - Angrez On Fri, Jul 10, 2009 at 1:03 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.comwrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to get firefox window handle
Right now there is no support for hwnd in Firewatir. Can you use Win32API to get the handle of the window using the title? If yes, then you can use firefox title to get the handle. - Angrez On Fri, Jul 10, 2009 at 2:35 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hi Angrez, Thanks for your reply. Following is the step which I want to perform. Want to click on the center point of the firefox window and want to do some copy paste operation. This is required as I can't set text in the frame as body of compose window in my project had used frame. In IE following is the piece of code I was using def getClientCenterPoint(browser) myRect= * 16# store four LONGs getClientRect=Win32API.new(user32, GetClientRect, ['I','P'], 'I') getClientRect = Win32API.new('user32', 'FindWindowEx', ['P'] * 4, 'L') getClientRect.call(browser.hwnd, myRect) x,y,xpos,ypos=myRect.unpack() setCursorPos = Win32API.new(user32, SetCursorPos, ['I','I'], 'I') setCursorPos.Call(xpos.to_i/2+90,ypos.to_i/2+150) end Please let me know if you want any other details. Regards, Kinnu On Fri, Jul 10, 2009 at 1:33 PM, Angrez Singh ang...@gmail.com wrote: can you explain what you are trying to do by getting the handle of window? may be we can suggest some workaround to do the same in Firewatir? - Angrez On Fri, Jul 10, 2009 at 1:03 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Any info on this friends? On Fri, Jul 10, 2009 at 11:44 AM, Kinnu kiranyajaman...@gmail.comwrote: Hi Friends, I am using ie.hwnd in watir to get the browser handle. I have observed that there is no such property available in FireWatir. Is there any work around for this? basically what i want to do is to get the center point of the browser. Regards, Kinnu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---