Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WinButton
#1
Not Solved
I have a 3 WinButtons on a dialog box. My Object Rep has them correctly indicated and when recording all goes well.

But on Run, the Save button fails to depess. If I run two or sometimes 3 or 4 saves in a row, the Save button may finally trigger. But then my script fails on the next Save as there is no Save button anymore.

How can I inssure that I get this Save button to the trigger the first time?

I tried:
Code:
If Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=False Then
    Browser("Wisdom CTE").Dialog("File Download").Activate
    Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
End If

and

Code:
Do Until Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=True
    Browser("Wisdom CTE").Dialog("File Download").Activate
    Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Loop

and

Code:
Do While Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=False
    Browser("Wisdom CTE").Dialog("File Download").Activate
    Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Loop

but these still timed out.

I think I need to find a better code to use other than Click.

Lorena ;-)
Reply
#2
Not Solved
Hi,
There are number of ways we can handle such issues, but before discussing them I have some questions
1) Is the window is active?
2) Are there any dependencies for "Save" button? (inorder to make it "enable")
3) Did you tried with synchronization? (waitProperty)

If you can share the above information then I can give the most useful solution among the all possibilities.
Thanks,
SUpputuri
Reply
#3
Not Solved
Supputuri,

Thx so much for writing.

1) Yes, I beleive the Window is active. I ensure that the button is actoive (see code)
2) Only the previous dialog box. Selecting it has this dialog box open
3) I tried a wait(2) but not the waitproperty.

Code:
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Highlight(0)
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Do Until Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=True
   Browser("Wisdom CTE").Dialog("File Download").Activate
   Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Loop

Still the Save button is not getting sellected.

What can I try "cringe" ;-)
Reply
#4
Not Solved
Ok.
Can you please check with this code and let me know the output.

Code:
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Highlight(0)
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Browser("Wisdom CTE").Dialog("File Download").WatiProperty "visible",true,20000
'Now check whether the dialog box is exist (Identify)
If Browser("Wisdom CTE").Dialog("File Download").Exist Then
'Now check whether the Save button is exist or not
If Browser("Wisdom CTE").Dialog("File Download").Winbutton("Save").Exist Then
    Browser("Wisdom CTE").Dialog("File Download").Winbutton("Save").Click
Else
    Msgbox "No luck with the button identification, but successfully identified the dialog box."
End If
Else
Msgbox "No luck with window identification. Update the dialog box object properties to get uniqueness."
End If

Thanks,
SUpputuri
Reply
#5
Not Solved
I get an error for a missing End.

Do I need an End after the first If or at the very end?
Reply
#6
Not Solved
It's working fine in my system.

Code:
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Highlight(0)
Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Click
Browser("Wisdom CTE").Dialog("File Download").WatiProperty "visible",true,20000
'Now check whether the dialog box is exist (Identify)
If Browser("Wisdom CTE").Dialog("File Download").Exist Then
'Now check whether the Save button is exist or not
    If Browser("Wisdom CTE").Dialog("File Download").Winbutton("Save").Exist Then
        Browser("Wisdom CTE").Dialog("File Download").Winbutton("Save").Click
    Else
        Msgbox "No luck with the button identification, but successfully identified the dialog box."
    End If
Else
    Msgbox "No luck with window identification. Update the dialog box object properties to get uniqueness."
End If

Can you please try again becuase the syntax is correct. Possibly you might be missing the End If for other conditional loop, but there is nothing wrong in this.
Thanks,
SUpputuri
Reply
#7
Not Solved
I so do apptreciate your help. Thx!

I dont know what to say. I repasted your code in, and I get an Error at the very last line saying End expexted on line 205. I comment out the code, and the script runs (other then finding my button)

I'll keep looking at my code. I could easily have missed something.

thxx

L
Reply
#8
Not Solved
You can paste the code in a new test and check if the code is working fine.
Thanks,
SUpputuri
Reply
#9
Not Solved
Thx for the idea. Please see my attachment.


Attached Files
.doc   End expected.doc (Size: 82 KB / Downloads: 112)
Reply
#10
Not Solved
Hi,

You are copying the wrong code just missed the last 3 line for that the error occurred.

Please copy the code carefully.The given syntax is correct.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Winbutton slow in clicking kpat 0 1,802 05-23-2016, 12:09 PM
Last Post: kpat
  how to get background color of a WinButton javierchen 1 3,048 03-17-2015, 10:59 PM
Last Post: babu123
  Dialog winbutton OK problem in IE dutchyes 1 4,319 08-03-2010, 10:02 AM
Last Post: Saket
  WinButton Object not support run time object properties Akhila 1 5,100 06-03-2008, 04:07 AM
Last Post: Anshoo Arora

Forum Jump:


Users browsing this thread: 1 Guest(s)