Help: File Size defining with Cucumber Watir

Hi,
I am working for automation with Cucumber and watir in a software
company.
I have a problem while working windows component for uploading I need
to do
the following:

Given /^I have selected a logo “([^”])" of size (\d+) MB$/ do |arg1,
arg2|
*

  • browser.file_field(:name, “file”).set(arg1)*
    end

But, I am having problem to get to the file size to pass this test. I
need
to compare the file size with the given size.

Anybody, please help me as soon as possible.


Thanks,
Irfan A. Rizvi (Sagar)

cell Numbers:
+880 1676 246 991
+880 1723 712 888

Tasawr Interactive http://www.tasawr.com