Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add new lines
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi all

I added these new lines to my Expert view ,

Code:
Dialog("File Download").Dialog("Save As").WinToolbar("ToolbarWindow32").Press "Desktop"

Dialog("File Download").Dialog("Save As").WinListView("SysListView32").Activate "updatescheduler-0.1.0"

Dialog("File Download").Dialog("Save As").WinListView("SysListView32").Activate "Downloads"


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
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
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.

Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
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"
but it gives this error

Object required:
Code:
'Browser(...).Dialog(...).WinButton(...).Click'

what can be the reason ?

Thanks
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
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.

Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
Hi

Now error is
Object doesn't support this property or method: 'Browser(...).Dialog(...).WinButton'

What can be the reason ?

Thanks
Reply
#6
Solved: 10 Years, 9 Months, 1 Week ago
Can you please paste your lines of code? also if possible a snapshot of Object repository.

Reply
#7
Solved: 10 Years, 9 Months, 1 Week ago
Hi Saket

This is the code :

Code:
Browser(":: PABC Online ::").Dialog("File Download").WinButton("Save")
     Browser(":: PABC Online ::").Page(":: PABC Online ::_2").Sync
     Dialog("File Download").Dialog("Save As").WinButton("Save").Click.Set            "C:\abc"
    Dialog("Download complete").WinButton("Close").Click

I think error is in the third line , when i remove .Set "C:\abc" part it works well

I attached the snapshot. Thank you
Reply
#8
Solved: 10 Years, 9 Months, 1 Week ago
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"
Dialog("File Download").Dialog("Save As").WinButton("Save").Click
Dialog("Download complete").WinButton("Close").Click
btw I cant find your snapshot here.
also please refer My Code to make your post more readable.

Reply
#9
Solved: 10 Years, 9 Months, 1 Week ago
Hi

I added your code like this

Code:
Dialog("File Download").Dialog("Save As").WinEdit("FileName").Set "C:\abc"
Dialog("File Download").Dialog("Save As").WinButton("Save").Click
Dialog("Download complete").WinButton("Close").Click

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
Reply
#10
Solved: 10 Years, 9 Months, 1 Week ago
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 Smile

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating multiple lines under a header - SAP Fredodo 7 5,347 01-02-2013, 04:54 PM
Last Post: Saleel Prabhu
  delete blank lines in excel cell QAVA 2 5,527 12-07-2012, 09:36 PM
Last Post: elango87
  Capturing lines between java buttons cowboy49 0 1,688 08-19-2012, 04:52 AM
Last Post: cowboy49
  help on replacing the long lines.. lotos 8 4,144 03-23-2011, 06:55 AM
Last Post: basanth27
  what add-ins should i add... Venkat 1 3,316 03-07-2011, 12:38 AM
Last Post: akbarsharifmd

Forum Jump:


Users browsing this thread: 1 Guest(s)