Results 1 to 2 of 2
  1. #1

    Sending values from notepad to the script

    I want to run the same test several times with different values in certain fields.Please help me with this.
    I really need help with this scenario.
    My Code-
    Sub Test2
    Dim p1
    Dim w1
    Dim w2
    Dim w3
    Dim w4
    Set p1 = Sys.Process("Q2Win")
    Set w1 = p1.Q2
    Call w1.UltraMainMenu.Click("Office|New Account...")
    Set w2 = p1.OrgNewDialog
    Set w3 = w2.WinFormsObject("pnlMain")
    Call w3.pnlExistingOrg.rbNew.Click(13, 14)
    Call w3.pnlNewOrg.tbName.Keys("Testcomplete51")
    w2.WinFormsObject("pnlFooter").pnlButtons.btnOK.Cl ickButton
    Set w2 = p1.AddressDialog
    Set w3 = w2.WinFormsObject("pnlMain").OrganizationAddresses .WinFormsObject("pnlMailing").grpMailing
    Call w3.txtAddress1_Mailing.Keys("mominc511")
    Set w4 = w3.txtLocality_Mailing
    Call w4.Click(103, 10)
    Call w4.Keys("baltimore[Tab]")
    Set w4 = w3.cboState_Mailing
    Call w4.Keys("mm")
    Call w4.Click(131, 11)
    Call w4.WinFormsObject("ValueListDropDow

    I need to pass values from notepad to this line of code
    Call w3.pnlNewOrg.tbName.Keys("Testcomplete51")

  2. #2

    Re: Sending values from notepad to the script

    Hi bollamster,

    If Notepad is running in your system, you can use the following code:

    <font class="small">Code:</font><hr /><pre>
    Call w3.pnlNewOrg.tbName.Keys(Sys.Process("notepad").Wi ndow("Notepad", "Untitled - Notepad", 1).Window("Edit", "", 1).wText)
    </pre><hr />

    Please see the "Getting an Edit Control's Text" and "Working With Edit Controls" help topics for more information. If this is not what you need, please describe the task you need to accomplish in detail.
    Allen - SmartBear Support



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:02 PM.

Copyright BetaSoft Inc.