![]() |
Add new lines - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Add new lines (/Thread-Add-new-lines) Pages:
1
2
|
Add new lines - eroshan - 09-14-2009 Hi all I added these new lines to my Expert view , Code: Dialog("File Download").Dialog("Save As").WinToolbar("ToolbarWindow32").Press "Desktop" and Object Repository also changed , but when i run the test it gives this error Cannot find the "ToolbarWindow32" object's parent "File Download" (class Dialog). Verify that parent properties match an object currently displayed in your application. There are no views on Active screen for these new lines. what can be the problem ? Thanks RE: Add new lines - Saket - 09-14-2009 I Just tried your code its working fine my side. May be the error is due to the save as dialog is not open. Can you make sure this and try again? I guess you are trying to set the file path for your download. it can be done directly setting the path to the filename edit box at Dialog. Code: Dialog("File Download").Dialog("Save As").WinEdit("File name:").Set <<Your Path>> Note: -Always wrap your code with proper tags available to make your post more readable. Refer Help. RE: Add new lines - eroshan - 09-14-2009 Hi yes , I want to change the save location of the downloading file. I used u mention cade Code: Dialog("File Download").Dialog("Save As").WinEdit("File name:").Set "C://paths" Object required: Code: 'Browser(...).Dialog(...).WinButton(...).Click' what can be the reason ? Thanks RE: Add new lines - Saket - 09-14-2009 Check the heirarchy of objects in Repository and also if the object exists there. may be the dialog appears under the browser object, change the code accordingly. RE: Add new lines - eroshan - 09-15-2009 Hi Now error is Object doesn't support this property or method: 'Browser(...).Dialog(...).WinButton' What can be the reason ? Thanks RE: Add new lines - Saket - 09-15-2009 Can you please paste your lines of code? also if possible a snapshot of Object repository. RE: Add new lines - eroshan - 09-15-2009 Hi Saket This is the code : Code: Browser(":: PABC Online ::").Dialog("File Download").WinButton("Save") I think error is in the third line , when i remove .Set "C:\abc" part it works well I attached the snapshot. Thank you RE: Add new lines - Saket - 09-15-2009 Yes you are right, The error is in the third line. You can put both commands(click and set)together. You will have to first set the path to the windedit box, There must be an edit box at dialog for file name, look for it and it to the Object repository. then fisrt set the path to this edit box and click on save button. It should be like Code: Dialog("File Download").Dialog("Save As").WinEdit("FileName").Set "C:\abc" also please refer My Code to make your post more readable. RE: Add new lines - eroshan - 09-15-2009 Hi I added your code like this Code: Dialog("File Download").Dialog("Save As").WinEdit("FileName").Set "C:\abc" And i attached snap shot also [img]C:\Documents and Settings\rcapl\My Documents\My Pictures\snap.bmp[/img] Now error is Cannot identify the object "FileName" (of class WinEdit). Verify that this object's properties match an object currently displayed in your application. what can be the problem ? THANKS RE: Add new lines - Saket - 09-15-2009 Hey Eroshan, what i had provided was just a sample code, while implementing this in your script, you should chnage it accordingly. from the error message you have mentioned, it is clear that the WinEdit object with name 'Filename' does not exist in your object repository. right? So first check you have the object in the repository, is already there then change the name replacing the 'Filename' in your script. Snapshot - May be your attaching properly .. click on the New Reply( this tread) Scroll down you will find a section 'Attachment' Click on Browse and set your path, click add attachment. does it helps ![]() |