Your e-Business Quality Partner eValid™ -- The Web Quality Suite
Browser-Based Client-Side Functional Testing and Validation Page Timing/Tuning Transaction Monitoring. WebSite Spidering & Analysis and Realistic Server Loading.

eValid -- Focus Issues in Background Operation
eValid Home

Summary
Most eValid monitoring playbacks are launched from the scheduler. When the playback script is "desktop safe" -- it does not need access to the desktop to operate correctly -- then scheduler launched playbacks are very reliable.

However, when a script is not "desktop safe" -- meaning that somewhere in the script playback there will be a command that requires the use of a desktop window -- then this mode of scheduling may not work correctly in all cases.

Possible Solutions

  1. Launch eValid from a Process

    1. Problem: The scheduler, when launching eValid with a command like the one shown below apparently runs the test, but the test fails. The script used involves using a series of desktop dependent commands, e.g. xyClick ....
      Scheduler entry:

      eValid -B script.evs ...other command line options...

    2. Diagnosis: In this case the scheduler keeps focus and does not grant focus the the launched process automatically. During playback, when any command that needs to have the desktop in focus run, the command will execute but will have no effect.

      The EventLog will report that all the commands executed; this because eValid has no way of knowing that it's desktop oriented commands will be completed (it assumes they are). In eValid the desktop oriented commands are routed through the Windows operating system before being delivered to the eValid window, or to a desktop window that eValid is trying to control (e.g. through Desktop Recording mode).

    3. Solution: The solution is launch eValid from a separate process, using a batch command that is launched by the scheduler.
      Batch File Run-eValid.bat:

      Start eValid -B script.evs ...other command line options...
      Exit

      The scheduler entry is one that invokes the Run-eValid.bat batch script:

      Run-eValid.bat

      The scheduler calls RuneValid.bat as a separate process, which in turns calls the eValid executable, which then execute with will full privileges including access to the desktop.

      Note: You might think that having the scheduler with "higher privileges" would make a difference here, but evidently it does not.

  2. Force Focus with Embedded Script Command
    An alternative method is to use the eVclick.exe utility to force focus in the launched process, by inserting a command like this at the top of the script, after the commands that will launch the initial startup window:

    ...
    SystemCall eVclick.exe 100 150 150
    ...
    The eValid browser is launched, but without focus. After 100 msec a click is issued to the 150 x 150 location on the screen. This click, having been launched by a sub-process (not by the scheduler) will force focus on the eValid window in order to deliver the click.

    (Note: There should not be anything sensitive at the 150 x 150 location on the screen. If there is, use a different location on the browser face.)

  3. Run With Highest Privileges
    In some Windows operating systems, e.g. Windows W7, the Task Scheduler has a settable option to allow the scheduled process to "run with highest privileges." We have found that this option overcomes focus issues.