我如何使用FileUploadDialogHandler在华廷访问该文件上传对话框 [英] How do I use the FileUploadDialogHandler in watin to access the file upload dialog
问题描述
我使用IE8与华廷,我试图通过测试我的网页上上传文件。 。/桌面:使用类似
I'm using IE8 with watin and am trying to test uploading a file via my webpage. I can't simply set the upload file using the set method like
ie.FileUpload(Find.ById(someId))集(C set方法,我不能简单地设置上传文件/image.jpg);
ie.FileUpload(Find.ById("someId")).Set("C:/Desktop/image.jpg");
由于上传的textarea是不是在IE8写的,所以我必须使用FileUploadDialogHandler但我无法找到如何任何的例子做这个。
because the upload textarea is not writeable in IE8, so I have to use the FileUploadDialogHandler but I can't find any examples of how to do this.
我已经找到并使用ConfirmDialogHandler的成功例子,但我似乎无法弄清楚如何使用FileUploadDialogHandler。
I have found and used examples of the ConfirmDialogHandler successfully, but I can't seem to figure out how to use the FileUploadDialogHandler.
任何例子将不胜感激。
推荐答案
您的代码看起来OK。您不必使用 FileUploadDialogHandler
。当你调用设置
方法时内部使用。
Your code looks OK. You don't have to use FileUploadDialogHandler
. It is used internally when you call Set
method.
这篇关于我如何使用FileUploadDialogHandler在华廷访问该文件上传对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!