Passing syntax check;but ignoring code - 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: Passing syntax check;but ignoring code (/Thread-Passing-syntax-check-but-ignoring-code) |
Passing syntax check;but ignoring code - cocojava - 04-13-2011 IE8 QTP10 XP I have a TEST that calls a pop-up calendar. It requires 'manual selection'. Sometimes when the test gets to that spot, the outline of the calendar is there; but unable to view. Closing the calendar and reopening the calendar fixes this. My work around, was to create a message box to tell the testor to select a date. This was how I coded it after the calendar launches: Code: Sub AddWorksheet () Yet when I run it - QTP ignores it completely. Why is my button not working? *Also restated QTP w VB turned on? nothing changed RE: Passing syntax check;but ignoring code - Saket - 04-25-2011 First of all, this type of work around should not be there in automation script which requires a manual intervention. you should identify why it is causing that issue, you may would like to sit with the dev to identify this. however if you need to put a workaround there, isn't it possible to do the same which you do manually i.e close the calendar and open it again through your script only. for your code in the query, I have few questions - what does worksheets.add do? - if your script ignores it this could be an issue at calling the sub, make sure you have called the sub properly. I believe the first statement is causing the issue. have you used 'On Error Resume Next' in your script? can you comment that out and check? |