Re: [wtr-general] watir web-driver hwnd

2011-11-01 Thread Jari Bakken
I see. Feel free to star this issue in the Selenium tracker, which deals
with adding a cross-platform API to resize and move windows in WebDriver
(which would allow us to expose it in watir-webdriver as well):

  http://code.google.com/p/selenium/issues/detail?id=174



On Tue, Nov 1, 2011 at 6:27 PM, Dan  wrote:

> I wanted to use Win32API to do some window manipulation.  I ended up
> finding another way to do it.  Basically I have a number of browsers I'm
> opening and I want to be able to position them in different places on the
> screen.  Not really a functional test or requirement, but it'll make it
> easier for me to monitor the tests when running and nice for demos.
>
> I decided to change the title of the browser and then I can uniquely
> identify them if I need to be able to before calling the Win32API functions
> I need to.
>
> Something like this:
>
> browser.execute_script("document.title = 'UniqueBrowser #{x}'")
> hWnd = FindWindow.call(nil, "UniqueBrowser #{x} - Google Chrome")
> ret = MoveWindow.call(hWnd, 0, 0, 640, 512, true)
>
> Knowing full well that after I goto any other page that this title I've
> set will be gone.  I just really need it for the initial set-up.
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Getting outerHTML from a table's cell.

2011-11-01 Thread Dan
Try just .html.  There is no .outerhtml method.

puts $browser.table()[x][y].html 

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] watir web-driver hwnd

2011-11-01 Thread Dan
I wanted to use Win32API to do some window manipulation.  I ended up 
finding another way to do it.  Basically I have a number of browsers I'm 
opening and I want to be able to position them in different places on the 
screen.  Not really a functional test or requirement, but it'll make it 
easier for me to monitor the tests when running and nice for demos.

I decided to change the title of the browser and then I can uniquely 
identify them if I need to be able to before calling the Win32API functions 
I need to.

Something like this:

browser.execute_script("document.title = 'UniqueBrowser #{x}'")
hWnd = FindWindow.call(nil, "UniqueBrowser #{x} - Google Chrome")
ret = MoveWindow.call(hWnd, 0, 0, 640, 512, true)

Knowing full well that after I goto any other page that this title I've set 
will be gone.  I just really need it for the initial set-up.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] watir web-driver hwnd

2011-11-01 Thread Jari Bakken
What are you trying to accomplish, high-level?

On Tue, Nov 1, 2011 at 4:06 PM, Dan  wrote:

> I've done a fair amount of searching for the method to get hwnd of a
> browser with the watir webdriver and I'm coming up empty handed.  It's very
> easy in Watir: browser.hwnd.
>
> Thanks!
> Dan
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] watir web-driver hwnd

2011-11-01 Thread Dan
I've done a fair amount of searching for the method to get hwnd of a 
browser with the watir webdriver and I'm coming up empty handed.  It's very 
easy in Watir: browser.hwnd.

Thanks!
Dan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Getting outerHTML from a table's cell.

2011-11-01 Thread Matt
Hey guys, I'm trying to get the outerHTML of the cell, which should
be :
YES

I am looping through all of the cells in the table and looking for the
outerHTML for each, but when I run the code, I get the error:
method_missing': undefined method `outerHTML' for #




 Row 2YES   NoNo   
YES 


 Row 3No   YES  NoNo  



Using code:
puts $browser.table()[x][y].outerHtml

Thanks guys

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com