Page 1 of 5 12345 LastLast
Results 1 to 10 of 45
  1. #1

    problems with running QTP on a locked system

    I am back after a long time...
    I am executing an application (through QTP scripts) which takes more than 15 minutes for completing its whole execution.
    My exact problem is, computer lock only.
    As application executes for more than 15 minutes, Computer locks automatically by System Administrator due to Security reasons (I know that System will automatically locks after 10 minutes, since Administrator set such an option for automatic Lock CTRL+ALT+DEL -> ENTER)...
    Is there any Option to Set for this issue in QTP or Script is available to recover from this scenaria.

    Your valuable comments/feedbacks are always appreciated,
    Leslie V

    Moderator note: I changed the title of this thread to more accurately reflect the issue it addresses.

    -Terry Horwath

  2. #2

    Re: No need for Locking system automatically.

    Can anyone comeup with ideas, as it is necessary for our script execution?

    Thanks once again,
    Leslie V

  3. #3

    Re: No need for Locking system automatically.

    ' ------ SCRIPT CONFIGURATION ------
    strUsername = "<UserName>" ' e.g. jsmith
    strDomain = "<NetBiosDomainName>" ' e.g. RALLENCORP
    ' ------ END CONFIGURATION ---------

    set objUser = GetObject("WinNT://" & strDomain & "/" & strUsername)
    if objUser.IsAccountLocked = TRUE then
    objUser.IsAccountLocked = FALSE
    WScript.Echo "Account unlocked"
    WScript.Echo "Account not locked"
    end if

  4. #4

    Re: No need for Locking system automatically.

    Thanks for the script MohanKakarla.
    I forgot to update this one more update:
    My application stops execution after automatic system lock (means CTRL+ALT+DEL->ENTER)....
    I need the computer to be and always in unlock state....

    Leslie V

  5. #5

    Re: No need for Locking system automatically.

    The easiest way is to avoid the scipt containing mic events(micTab,micDown etc). this will solve many of the issues.

  6. #6

    Re: No need for Locking system automatically.

    Actual i guess the easiest way out would to use the Type method frequently in the script. Type method simulates keyboard events and might help you resolve the issue.

    You open a dummy window and keep typing on that.

  7. #7

    Re: No need for Locking system automatically.

    [ QUOTE ]
    Type method simulates keyboard events and might help you resolve the issue.

    [/ QUOTE ]
    So finally concluded that "Type" method usually simulates Keyboard events, hence there will be no automatic System lock.
    Thanks to all for valuable replies.
    Leslie V

  8. #8

    Re: No need for Locking system automatically.

    Leslie, Did you try? I have assumed it would work, does it? but i have not confirmed it...So if you can post your findings.

  9. #9
    SQA Knight
    Join Date
    Jul 1999
    Grand Rapids, MI

    Re: problems with running QTP on a locked system

    This topic comes up from time to time, and I am currently facing the same issue because I am in a corp environment that strickly enforces a 20 minute locking of the systems when there is no KB or mouse activity.

    This issue is covered in some detail in the Mercury Support KB article #31068, titled "Can QuickTest Professional replay on a locked machine". This article addresses both the locked system (also called the locked keyboard) scenario, as well issues with trying to run QTP remotely on systems that are referred to as having an "incompatible execution environment".

    While you need to refer to the article to get some registry settings to work around some of the issues (and I will not post them here as you must be under a support contract to get this type of HP/Merc info), I don't think that the following statement should be considered HP/Merc proprietary--and it describes the "locked system/locked keyboard" issue in a well written summary:
    [ QUOTE ]

    You may be able to start a script running, then lock your machine. However, there is no guarantee that QuickTest Professional will be able to interact with a GUI application on a locked machine. The application under test may also not function as expected when a machine is locked.
    When the machine is locked, the windows operating system disables windows messages, including mouse and the keyboard messages. Some QuickTest Professional methods use these system messages to communicate and interact with the application. On a locked system, these QuickTest Professional methods are unable to replay. This is a limitation of the O/S that is preventing the QuickTest Professional script to replay in a locked mode.
    However, if the application supports using events that are not windows messages (such as web events), you may have some success with replay. If any of the methods use system messages internally (i.e., in the compiled code), they will fail. Checkpoints and functions to retrieve text or other properties are likely to fail also.
    If you are concerned about security, the current options would be either to keep the machine in a locked room, or remove means of interacting with the machine, such as the keyboard, and/or mouse. QuickTest Professional should still be able to replay without these devices plugged into the machine. You can also lock the keyboard and mouse from within the script.

    [/ QUOTE ]

    It is my impression from this description that there is probably no truly reliable alternative to this problem. Perhaps the one Tarun suggests will work in many or even most situations.

    Stupid idea removed here...

    -Hope this helps, Terry Horwath

  10. #10

    Re: problems with running QTP on a locked system

    I was able to overcome this problem for Web Applications.
    Since QTP using events which can be executed on locked box, the only real problem is dealing with dialog boxes. WinButton().Click doesn't work. To get around this problem I am using:
    WM_COMMAND = 273 '&H111
    'buttonCode - window id property for the button to click
    extern.PostMessage(Hwnd, WM_COMMAND, buttonCode, 0)

    We run our automation nightly on locked boxes.

    Warning: Do not use Java Add-in 9.1 for locked execution - it will crash QTP.



Page 1 of 5 12345 LastLast

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 07:36 PM.

Copyright BetaSoft Inc.