[wtr-general] Re: File Field Help

2009-10-06 Thread Bill Agee
Looks like it works if you fire the onchange event on the input tag manually - this code works for me: (f is the Firefox object) upload_element = f.element_by_xpath(//inp...@name='field_uploadfile']) upload_element.set(C:\\foo.txt) upload_element.fire_event(onchange) f.span(:text, Upload

[wtr-general] Re: File Field Help

2009-10-05 Thread Bill Agee
Ah, so it's a difference in behavior between FireWatir and Watir? Not sure why that would happen. Perhaps setting the field with Firefox doesn't fire the necessary events to enable the upload button? Don't know. You might try invoking the refresh() method on the Firefox object after you set

[wtr-general] Re: File Field Help

2009-10-05 Thread Raveendran P
Hi Bill, My Bad luck , After $ff.refresh -- Still the upload video button is not enabled .. :) Awaiting your reply Thanks On Mon, Oct 5, 2009 at 3:04 PM, Bill Agee billa...@gmail.com wrote: Ah, so it's a difference in behavior between FireWatir and Watir? Not sure why that would happen.

[wtr-general] Re: File Field Help

2009-10-04 Thread Raveendran P
Hi Bill, That code sets properly. Its working exactly . But i need alternate way to do this. Because The upload button is not enabled automatically after set the p[ath via like this. For more details 1. Login youtube. 2. Uninstall Fal;sh player in your machine 3. Goto upload video page. 4.

[wtr-general] Re: File Field Help

2009-10-04 Thread Raveendran P
Hi Bill, For more details, The same code working in WATIR: $ie.file_field(:name, field_uploadfile).set($video_files[0]) $ie.span(:text, 'Upload Video').click Here i can able to click the Upload Video span . Because it is enabled after set the file_field path. But the same code not