Most likely happening from the text_field command...
If the control is disabled, you will not be able to modify the value for it. This happens all the time in DHTML. Does that text box only become available if more than one page exists? Might want to look into that, maybe set up a condition block to test whether there are mutiple pages...
Hope it helps!
----- Original Message -----
From: sikander <[EMAIL PROTECTED]>
Date: Friday, July 21, 2006 3:19
Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error
To: [email protected]
> Hi!
>
>
>
> I was using the following code to execute my scripts but uncounted
> WIN32OLERuntimeError: focus - Error
>
>
>
> Code:
>
> $ie.frame("Main").text_field(:id,
> "tbJobs__ctl0_txtTbPrnPageNumber").set("2")
>
> $ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click
>
>
>
> Error is:
>
> WIN32OLERuntimeError: focus
>
> OLE error code:800A083E in htmlfile
>
> Can't move focus to the control
> because it is invisible, not enabled,
> or of a type that does not accept the focus.
>
> HRESULT error code:0x80020009
>
> Exception occurred.
>
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing'
>
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set'
>
>
>
> Will you plz suggest me how to handle this.
>
>
>
> Thanks,
>
> SIkander
>
>
----- Original Message -----
From: sikander <[EMAIL PROTECTED]>
Date: Friday, July 21, 2006 3:19
Subject: [Wtr-general] Getting WIN32OLERuntimeError: focus - Error
To: [email protected]
> Hi!
>
>
>
> I was using the following code to execute my scripts but uncounted
> WIN32OLERuntimeError: focus - Error
>
>
>
> Code:
>
> $ie.frame("Main").text_field(:id,
> "tbJobs__ctl0_txtTbPrnPageNumber").set("2")
>
> $ie.frame("Main").button(:id, "tbJobs__ctl0_btnTbPrnGo").click
>
>
>
> Error is:
>
> WIN32OLERuntimeError: focus
>
> OLE error code:800A083E in htmlfile
>
> Can't move focus to the control
> because it is invisible, not enabled,
> or of a type that does not accept the focus.
>
> HRESULT error code:0x80020009
>
> Exception occurred.
>
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `method_missing'
>
>
> c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3388:in `set'
>
>
>
> Will you plz suggest me how to handle this.
>
>
>
> Thanks,
>
> SIkander
>
>
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
