Want to upload file using Browse button


#1

Below is the code:

$ie.file_field(:id,’_20_file’).click_no_wait

$ie.file(:id,’_20_file’).click

$ie.button(:id,’_20_file’).click

Not working above all script. Please any pointer ?


#2

I assume you’re talking about watir. I don’t think you need to click,
but maybe focus. you can don’t need to click. You can do
$ie.file_field(:id,’_20_file’).set(‘C:<Path_to_file>’)

thanks,

Bassel
http://www.imustrant.com

Bibhu Behera wrote:

Below is the code:

$ie.file_field(:id,’_20_file’).click_no_wait

$ie.file(:id,’_20_file’).click

$ie.button(:id,’_20_file’).click

Not working above all script. Please any pointer ?