Results 1 to 6 of 6

Thread: How will i count uploaded files

  1. #1
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    How will i count uploaded files

    Hi Guys

    One question:
    In one Tab I have list of Txt files that were uploaded.. .I want to count the number of uploaded file.. How will I do that?

    Thanks
    Newhere


  2. #2

    Re: How will i count uploaded files

    Can you post a screenshot?


  3. #3
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    Re: How will i count uploaded files

    Quote Originally Posted by Anshoo_Arora View Post
    Can you post a screenshot?

    Hi Anshoo

    I am sorry I won’t be able send you a Screen shot as I am working on federal gov project so not allowed to disclosed the information. I hope you can understand.

    Well I am tring here to explain my web page.

    In my web page there are ‘upload’ tab and ‘Received’ tab. From upload tab I have uploaded few files and then I have to check in received tab that those files are uploaded or not. And as per use cases in received page, per page should have 25 files and more then 25 file files will go to the next page.

    Now here my question is: can I count those file in received page with QTP script rather then counting manually?

    i hope you got my question

    Thanks
    Newhere.


  4. #4

    Re: How will i count uploaded files

    Does it mention somewhere in the received page that "X" number of files have been uploaded successfully? Or, does it list the names of all the files that have been uploaded? You can use GetROProperty and find out how many files were uploaded at runtime, store that value and even report it to your Results summary.


  5. #5
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    Re: How will i count uploaded files

    Quote Originally Posted by Anshoo_Arora View Post
    Does it mention somewhere in the received page that "X" number of files have been uploaded successfully? Or, does it list the names of all the files that have been uploaded? You can use GetROProperty and find out how many files were uploaded at runtime, store that value and even report it to your Results summary.
    Hi Anshoo sorry for the late reply. Well it does not mention anywhere that "X" number of files have been uploaded and it does not list the names of all the files that have been uploaded either. I am able to click on uploaded files and save them in my machine. Can you please send me a piece of code as an example?

    Thanks
    Newhere


  6. #6

    Re: How will i count uploaded files

    Well, if the application does not show how many files it has uploaded, it is going to be very hard for me to write a script to really find out how many were really uploaded.

    What I am trying to say is that, even if you upload 10 files, but in fact only 5 of them were uploaded in real, and 5 were not, the application must tell you which ones weren't uploaded and which ones were. Also, it should tell you how many of them were uploaded too!

    So, even if I give you a script, it will be a one that will retrieve the RO property of a WebElement to find out how many files were uploaded during runtime. The script would be something in the lines of this:

    NumOfUploads = Browser().Page().WebElement("innertext:=.*uploaded.*","index:=0").GetROProperty("innertext")
    MsgBox NumOfUploads


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact