SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Userchecks / Validation - Anyone?

    Hi, I am scripting in VB using Automated QA- Test Complete.
    Does anyone know how I can validate that an Application has opened? i.e. the logic is open the app, and login - after logging in, verify that the app has been opened, if not abort the test as there is nothng much that can be done if the app doesnt open! I am used to writing USerchecks, but the app doesnt support it - whats the best way you reckon

    Any suggestions?
    Cheers! [img]/images/graemlins/confused.gif[/img] <font color="purple"> </font>

  2. #2
    Junior Member
    Join Date
    Apr 2009
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Userchecks / Validation - Anyone?

    Possibly not the best way....

    Using the WMI service search all the processes while waiting for your process to appear,


    // Search Task Manager
    var strComputer = ".";
    var strQuery = "Select * from Win32_Process where name = '" + AppName + "'";
    var objWMIService = GetObject("winmgmts:\\\\"+ strComputer +"\\root\\cimv2");
    var wmiProcesses = objWMIService.ExecQuery(strQuery);
    var wmiItems = new Enumerator(wmiProcesses);

    var intCheck = 1;
    while (wmiProcesses.count &lt; 1)
    {
    var wmiProcesses = objWMIService.ExecQuery(strWQL);
    intCheck += 1;
    if (intCheck &gt; 10)
    {
    Log.Enabled("The Application was not opened", Sys.Desktop.Picture());
    StopTest();
    }

    }
    The function above was translated into JScript from VBScript. The VBScript Version is on MSDN...
    ________________________________________________
    Andrew Newton
    Plank42@gmail.com
    Meditation - It's better than sitting round the house humming to yourself ;-/

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    1,049
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Userchecks / Validation - Anyone?

    Hi,

    I recommend that you use the approach described in the "Waiting for a Process or Window Activation" help topic. If waiting for a specific process and window to appear is not enough in your case, you need to wait until a specific message is displayed in the status bar or until another property changes as it is described in the "Waiting for Object State Changes" help topic.
    Regards,
    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
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:27 AM.

Copyright BetaSoft Inc.