05-10-2012, 01:17 AM
How can I validate that when a user clicks 'submit' on an HTML form that a windows dialog box with the name of the file to download comes up?
Thanks!
Thanks!
Validate a File Download
|
05-10-2012, 01:17 AM
How can I validate that when a user clicks 'submit' on an HTML form that a windows dialog box with the name of the file to download comes up?
Thanks!
05-10-2012, 10:22 AM
Hi,
Do u want to check if file is downloaded or not??? Regards, Sankalp
05-10-2012, 07:46 PM
Yes, I'd like to know if it's downloaded. My main concern was getting QTP to click the "save" buttons on the windows dialog boxes.
05-10-2012, 10:17 PM
You can add the windows dialog boxes to your object repository, then record the click on save (or just add using object spy).
I believe you have to setup QTP to accept windows dialog boxes, IIRC it's under [Tools] > [Web Event Recording Settings] > [Custom] > All? and make sure "onclick" is set to "Always"
05-11-2012, 12:43 AM
I've added the windows dialog to my object repository and changed the setting for onclick. However, I'm still getting this error:
Object not visible Line (5): "Browser("Browser").Dialog("File Download").Activate". Perhaps I didn't add the object to my repository correctly? It seems to get added automatically as soon as I click on it when I'm recording.
05-11-2012, 01:40 AM
(This post was last modified: 05-11-2012, 01:44 AM by joncfrazier.)
QTP error codes are only semi-useful, as they mostly list just the first line of the code. What is on the 5th line? I find that recording is the fastest and easiest way to add objects to the repository, and have yet to have any real issue on adding them. Descriptive Programming, so far, seems a bit of a waste unless you already know what the identifiers are (which I rarely do).
05-11-2012, 01:44 AM
Code: Browser("Browser").Page("Page").WebEdit("meetingid").Click
05-11-2012, 01:50 AM
(This post was last modified: 05-11-2012, 01:55 AM by joncfrazier.)
My only thought right now is that it's attempting line 5, activate, faster than that dialog can show up. Try inserting Wait (x) between them. Where x is a time in seconds.
edit: From what I understand of this, the user inputs data, then submits it, and then is given a prompt to download the data they were just given? Are there no other screens or actions taken between these? Somtimes QTP misses on some steps if the user directly clicks on functional buttons (login, submit, search, etc..) I have to sometimes click off in a blank area to force QTP to record what I just did, and then delete the empty space click.
05-11-2012, 10:57 AM
Use synchronisation/WAITProperty on the File download dialog box. Its happening because script is trying to activate the dialog where as once you submit a form, it usually takes sometime to popup/display the next window.
Regards, Ankesh |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Should I download every patch in order to UFT recognize the Chrome and FireFox browse | jesusisaac | 6 | 5,307 |
08-25-2016, 05:03 PM Last Post: Ankesh |
|
[UFT][JSON] Validate Json file | robertosalemi | 0 | 3,758 |
02-10-2016, 04:36 PM Last Post: robertosalemi |
|
How to validate mandatory filed (*) in web application using | balak89 | 1 | 4,095 |
09-13-2015, 12:54 AM Last Post: ADITI1992 |
|
Need to validate a .txt file and .jpeg image. | aman8604 | 0 | 2,319 |
04-09-2015, 11:33 AM Last Post: aman8604 |
|
Validate New Employee Creation | hello_sanjay | 0 | 1,884 |
04-07-2015, 06:16 PM Last Post: hello_sanjay |