IF statement in VBScript to check the 'attached text' property of a WinButton

Posted on 2008-11-10
Last Modified: 2012-05-05
See the attached .doc file for a complete descriptio of my question.  Thanks!
Question by:morciani
    1 Comment

    Accepted Solution

    Hi All,

    I'm working on building some scripting using QuickTest Professional (and learning VBScript along the way).  Take a look at the following code snippet:

    Browser("CBS signon").Page("Personal Market Billing_10").WebButton("Submit").Click
          If <condition> Then
                RunAction "Path_DuplicatePayment", oneIteration
                RunAction "MakeSuccessfulCCPayments", oneIteration
          End If
    Browser("CBS signon").Dialog("Microsoft Internet Explorer").WinButton("OK").Click

    I want to build an If statement that checks the Text (or some other unique property) of the dialog box that is made viewable after the Submit action.  Can someone help me with the syntax of the <condition> that Im testing for?  The dialog box that is displayed is as follows (see attached file):
    I want the condition to check the 'attached text' property of the OK WinButton.  I just need help with the syntax&.  Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now