Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing syntax check;but ignoring code
#1
Not Solved
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 ()
          Worksheets.Add
          MsgBox  "May need to launch it again."  _
   , vbInformation + vbOKOnly,  "Choose Date on the Calendar screen "
End Sub

Yet when I run it - QTP ignores it completely. Why is my button not working?
*Also restated QTP w VB turned on? nothing changedSad
Reply
#2
Not Solved
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?

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of parameters missing when passing between actions skumar007 1 2,987 10-10-2014, 02:00 AM
Last Post: skumar007
  Action Parameter passing problem Qtpuser1 1 2,832 04-18-2014, 06:23 AM
Last Post: kgovadav
  Getting run error passing a Frame into a user defined function!!! sepgs2004 1 2,821 10-14-2013, 06:37 PM
Last Post: anil2u
  Can some one check my code and tell me whats wrong in it. zakshah.12 3 3,854 03-06-2013, 03:26 AM
Last Post: newqtp
  how to call reusable actions by passing parameters.? Arun091 0 3,870 08-16-2012, 07:28 PM
Last Post: Arun091

Forum Jump:


Users browsing this thread: 1 Guest(s)