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

I think i did what you mention. you can see it on snapshot (this time i attached it)

but i have no idea how should i change Test object details according to the new WinEdit. Can you help me for that ?

(The error is same still)

Thanks


Attached Files Image(s)
   
Reply
#12
Solved: 10 Years, 9 Months, 1 Week ago
How did you added the objects.
I doubt the heirarchy is not proper, I have never seen one dialog under a dialog.
also, I cant see the naiveclass property for FileName, are you able to highlight the control in your application?
Can you check if the below statement works?
Code:
Dialog("File Download").Dialog("Save As").WinButton("Save").Click

if No then please try again adding object into OR. I beleive the 'Save As' dialog should be different Node.
Ex: Refer Snap of OR and the code should be like

Code:
Dialog("File Download").WinButton("Save").Click
Dialog("Save As").WinEdit("FileName").Set "C:\"
Dialog("Save As").WinButton("Save").Click
let me know how it goes.


Attached Files Image(s)
   

Reply
#13
Solved: 10 Years, 9 Months, 1 Week ago
yes Saket you mentioned line is perfectly working without this

Code:
Dialog("Save As").WinEdit("FileName").Set "C:\"

can you guide me to set OR properties for new WinEdit object ?

the error is
[color]Cannot identify the object "FileName" (of class WinEdit). Verify that this object's properties match an object currently displayed in your application.[/color]
Reply
#14
Solved: 10 Years, 9 Months, 1 Week ago
I am not getting you, which line is perfectly working?
Code:
Dialog("File Download").Dialog("Save As").WinButton("Save").Click

or

Dialog("Save As").WinEdit("FileName").Set "C:\"

Have you tried adding the object again?

Reply
#15
Solved: 10 Years, 9 Months, 1 Week ago
Hi saket
This line is working
Code:
Dialog("File Download").Dialog("Save As").WinButton("Save").Click
This line is not working
Code:
Dialog("Save As").WinEdit("FileName").Set "C:\"


I think error is in the OR property of the WinEdit object , is't it?
Reply
#16
Solved: 10 Years, 9 Months, 1 Week ago
Yes I think so, delete the object from OR and add it again.
does your save as dialog is same as in snap below? I guess Yes, then add the highlighted object.

It should work now.


Attached Files Image(s)
   

Reply
#17
Solved: 10 Years, 9 Months, 1 Week ago
Hello Saket

I am getting this error msg when i m trying to set the filepath+filename in code to download an excel file.

The operation cannot be performed

Line (281): "Dialog("text:=File Download").Dialog("text:=Save As").WinEdit("text:=File &name:").Set FilePath & FileName".

Here is the lines of code which is giving above error :

Dialog("text:=File Download").Dialog("text:=Save As").WinEdit("text:=File &name:").Set "F:\temp.xls"


Please suggest wht could be the problem!
Regards
Neetika
Reply
#18
Solved: 10 Years, 9 Months, 1 Week ago
Hi Neetika, always create a new thread for the new query instead diverting athread.
for answer to your question - WinEdit("text:=File &name:"). in your statement is causing the issue. by default qtp treats all program description as regular expression. and so it does the same for File &Name. there could be two solutions for this 1. use regular expression like text:=File \&name:" 2. use description.create and put value as "File &Name"

dont use text to identify a winedit object instead use nativeclass/class and index.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating multiple lines under a header - SAP Fredodo 7 5,346 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,687 08-19-2012, 04:52 AM
Last Post: cowboy49
  help on replacing the long lines.. lotos 8 4,135 03-23-2011, 06:55 AM
Last Post: basanth27
  what add-ins should i add... Venkat 1 3,315 03-07-2011, 12:38 AM
Last Post: akbarsharifmd

Forum Jump:


Users browsing this thread: 1 Guest(s)