Results 1 to 2 of 2

Thread: Assigning a variable based off app's current state

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    2

    Assigning a variable based off app's current state

    Enabled is set to True in the Object Repository. When the script gets to var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled") .. The script crashes and says it cannot identify the Object "Delete" (Please see attachment).

    Any suggestions?



    VbWindow("frmSubMaint").Activate
    var = VbWindow("frmSubMaint").VbButton("Delete").GetTOProperty("Enabled")

    Do until var = False
    VbWindow("frmSubMaint").VbButton("Delete").Click
    VbWindow("frmSubMaint").Dialog("Delete Routine").WinButton("Yes").Click
    Wait 65
    var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled")
    Loop

    VbWindow("frmSubMaint").VbButton("Add").Click
    VbWindow("frmSubMaint").ActiveX("SSTab").VbEdit("txtTab1Field(4)").Set "TESTING"
    VbWindow("frmSubMaint").ActiveX("SSTab").VbEdit("txtTab1Field(10)").Type "24637"
    VbWindow("frmSubMaint").VbWindow("frmLookUp").VbList("lstCodes").Select "PAINT LICK"
    VbWindow("frmSubMaint").VbWindow("frmLookUp").VbList("lstCodes").Activate "PAINT LICK"
    VbWindow("frmSubMaint").VbButton("Save").Click

    Attached Files Attached Files
    Last edited by QTP_Player77; 11-14-2007 at 02:17 PM.

  2. #2

    Re: Assigning a variable based off app's current state

    Does it crash in the loop or before the loop starts?

    VbWindow("frmSubMaint").Activate
    var = VbWindow("frmSubMaint").VbButton("Delete").GetTOProperty("Enabled") (here?)

    Do until var = False
    VbWindow("frmSubMaint").VbButton("Delete").Click
    VbWindow("frmSubMaint").Dialog("Delete Routine").WinButton("Yes").Click
    Wait 65
    var = VbWindow("frmSubMaint").VbButton("Delete").GetROProperty("Enabled") (or here?)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact