How to upload a file with watir and IE?

前端 未结 5 1368
情歌与酒
情歌与酒 2020-12-18 01:07

I am writing a watir script to test an upload form.

But the script does not automatically choose the file that is to be uploaded from my harddrive.

Instead I

5条回答
  •  清酒与你
    2020-12-18 02:01

    I would suggest that you take a look at FileField#set in input_elements.rb (in your Ruby gems directory), and change sleep 1 to sleep 2 (or some higher number). I have noticed that on slower machines it takes more than a second for file upload pop up to appear.

提交回复
热议问题