From: Ronald B. <rb...@rb...> - 2017-08-10 06:27:05
|
On Wed, 9 Aug 2017 18:58:31 +0200 José Román | Idiria S.L. wrote: > >1.- Open the selection dialog (or simulate it). >2.- Make JS process the selected files. > Without have access to the real page an answer is not that simple. >1.- Open the selection dialog (or simulate it). Usuall there is a input control with type 'file' somewhere on the page. This is more or less the only way to add files to a form to upload them. You have to find that control and use setValueAttribute with the absolute path of the file. >2.- Make JS process the selected files. As always there is nothing special - there is no need to deal with the js itselt. Simply do the same you do in the real browser e.g. click the submit button. HtmlUnit tries to do exactyl the same js processing as real browsers. RBRi -------------------------- WETATOR Smart web application testing http://www.wetator.org |