![]() |
WinButton - 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: WinButton (/Thread-WinButton) Pages:
1
2
|
WinButton - mv8167 - 05-04-2011 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 and Code: Do Until Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=True and Code: Do While Dialog("File Download_3").Dialog("Save As").GetROProperty("visible")=False but these still timed out. I think I need to find a better code to use other than Click. Lorena ;-) RE: WinButton - supputuri - 05-05-2011 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. RE: WinButton - mv8167 - 05-06-2011 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) Still the Save button is not getting sellected. What can I try "cringe" ;-) RE: WinButton - supputuri - 05-06-2011 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) RE: WinButton - mv8167 - 05-06-2011 I get an error for a missing End. Do I need an End after the first If or at the very end? RE: WinButton - supputuri - 05-06-2011 It's working fine in my system. Code: Browser("Wisdom CTE").Dialog("File Download").WinButton("Save").Highlight(0) 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. RE: WinButton - mv8167 - 05-06-2011 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 RE: WinButton - supputuri - 05-06-2011 You can paste the code in a new test and check if the code is working fine. RE: WinButton - mv8167 - 05-06-2011 Thx for the idea. Please see my attachment. RE: WinButton - atanu - 05-07-2011 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. |