I'm not sure that this button is a regular Windows control (http://
msdn.microsoft.com/en-us/library/bb773173(VS.85).aspx) you could try
to send and Enter key there which should trigger the OK if the window
itself is programmed correctly :)

Jarmo

On Sep 23, 11:16 am, Usman Hussain <[email protected]> wrote:
> Also te properties shown above are for the text on the button (the OK
> button)
> here are the properties for the whole button... its less information
> that the one above but it might help you guys help me solve this~????
>
> button properties:
> AutomationElement
>   General Accessibility
>     AccessKey:  ""
>     AcceleratorKey:     ""
>     IsKeyboardFocusable:        "False"
>     LabeledBy:  "(null)"
>     HelpText:   ""
>
>   State
>     IsEnabled:  "True"
>     HasKeyboardFocus:   "False"
>
>   Identification
>     ClassName:  ""
>     ControlType:        "ControlType.Custom"
>     Culture:    "(null)"
>     AutomationId:       ""
>     LocalizedControlType:       ""
>     Name:       ""
>     ProcessId:  "5828 (firefox)"
>     RuntimeId:  "42 24184740 2 4 0"
>     IsPassword: "False"
>     IsControlElement:   "True"
>     IsContentElement:   "True"
>
>   Visibility
>     BoundingRectangle:  "(1864, 720, 37, 17)"
>     ClickablePoint:     "(null)"
>     IsOffscreen:        "False"
>
> ControlPatterns
>   Invoke
>
> On Sep 23, 9:09 am, Usman Hussain <[email protected]> wrote:
>
>
>
> > Hi Guys,
>
> > Im having trouble trying to hit a button at the moment using Autoit.
> > The main problem is, if you were to tab around the screen you can
> > never get focus on it.
>
> > The pop up is in a firefox window, so its more like a browser pop up
> > with window (hence why im using autoit) characteristics.
>
> > Im using UI Spy to locate the elements when ever i use Autoit.
>
> > At the moment my code looks like this:
> >   require 'rubygems'
> >   require 'win32ole'
> >   require 'watir-webdriver'
>
> >   autoit = WIN32OLE.new('AutoITX3.Control')
> >   autoit.WinActivate('Mozilla Firefox')
> >   autoit.Send('{TAB}')
> >   autoit.Send('{TAB}')
> >   autoit.Send('/content/story/jackpotjoy/video_test99')
> >   autoit.ControlClick("Mozilla Firefox","","OK")
> >   puts 'This is working'
>
> > so im able to enter in text into the browser field but then the OK and
> > Cancel button i cannot click because there is no focus on them.
> > the line autoit.ControlClick("Mozilla Firefox","","OK") does not seem
> > to do anything... im not sure have i written it incorrectly?
>
> > The UISpy properties for the OK button are:
>
> > AutomationElement
> >   General Accessibility
> >     AccessKey:  ""
> >     AcceleratorKey:     ""
> >     IsKeyboardFocusable:        "False"
> >     LabeledBy:  "(null)"
> >     HelpText:   ""
>
> >   State
> >     IsEnabled:  "True"
> >     HasKeyboardFocus:   "False"
>
> >   Identification
> >     ClassName:  ""
> >     ControlType:        "ControlType.Text"
> >     Culture:    "(null)"
> >     AutomationId:       ""
> >     LocalizedControlType:       "text"
> >     Name:       "OK"
> >     ProcessId:  "5828 (firefox)"
> >     RuntimeId:  "42 10880700 2 4 0 0"
> >     IsPassword: "False"
> >     IsControlElement:   "True"
> >     IsContentElement:   "True"
>
> >   Visibility
> >     BoundingRectangle:  "(1875, 722, 17, 13)"
> >     ClickablePoint:     "(null)"
> >     IsOffscreen:        "False"
>
> > ControlPatterns
> >   Invoke
>
> > can anyone help me out on this? please let me know if you need any
> > more help...

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to