Hi, Jarmo Pertman, Thanks for your response. Actually there was a problem to find out a file size for upload. Becuase, I need to know if the file size is more then "something" then the system will display a message "xcvbnnm". Look at the step generated by cucumber: *Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1, arg2| * * browser.file_field(:name, "file").set(arg1)* *end* * this step will be passed if size of image file arg2 is the size equal to arg1.
the file there I set (**browser.file_field(:name, "file").set(arg1)) too upload a picture, I need to write a code to show that the file has a size of minimum requirement and so that I need to findout the size of that. So here I need to know how know a size of a picture or any file which are taken to upload. * On Sun, Dec 19, 2010 at 6:24 PM, Jarmo Pertman <[email protected]> wrote: > I didn't understand what's the exact problem. Could you be more > specific what you'd want to exactly do? > > Jarmo Pertman > ----- > IT does really matter - http://www.itreallymatters.net > > > On Dec 19, 5:02 am, Irfan Ahmed <[email protected]> wrote: > > 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 Ahmed Rizvi (Sagar) > > > > cell Numbers: > > +880 1676 246 991 > > +880 1723 712 888 > > > > Tasawr Interactive <http://www.tasawr.com> > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected]<http://groups.google.com/group/watir-general%[email protected]> > -- Thanks, Irfan Ahmed Rizvi (Sagar) cell Numbers: +880 1676 246 991 +880 1723 712 888 http://www.welltreat.us http://restaurant.welltreat.us/ http://isp.welltreat.us/ -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
