Select Page

Can’t automate calculator

Home Automation Forum Robotic Process Automation WDG Automation Can’t automate calculator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #227124
    Anonymous
    Inactive

    Tried simple automation to get calculator button press. Why it doesn’t find window from launch and attach window?

    Error:

    WDG.Automation.Language.RuntimeException: Error executing command at line 12: logMessage –message “Launch & Attach Window debugging ———————————-\r\nLaunch & Attach window success: ${successful}\r\nLaunch & Attach Process ID: ${processID}\r\nTitle: ${windowCalc.Title}\r\nProcess Name: ${windowCalc.ProcessName}\r\nPID: ${windowCalc.ProcessId}\r\nIsChild: ${windowCalc.IsChild}\r\nClass name: ${windowCalc.ClassName}\r\nID: ${windowCalc.Id}\r\n———– /END Launch & Attach Window debugging ———————————-” –type “Info” —> System.NullReferenceException: Object reference not set to an instance of an object.

    Server stack trace:
    at WDG.Automation.Runtime.WindowVariant.get_Title()

    Exception rethrown at [0]:
    at DynamicExpresso.Lambda.InvokeWithUsedParameters(Object[] orderedArgs)
    at WDG.Automation.Language.DynamicExpressoFacade.o1SrZDUhMqAUo2RrwRR(Object , Object , Object )
    at WDG.Automation.Language.DynamicExpressoFacade.Eval(String expressionText)
    at WDG.Automation.Language.AutomationExtensions.cwhsZKVB3UM8t8OKNON(Object , Object )
    at WDG.Automation.Language.AutomationExtensions.Evaluate(IAutomationContext context, String text)
    at WDG.Automation.Language.AutomationExtensions.wqBnAhVDs1oMhVEtAhr(Object , Object )
    at WDG.Automation.Language.AutomationExtensions.Evaluate(IAutomationContext context, IAutomationCommand command)
    at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
    — End of inner exception stack trace —
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at WDG.Automation.Language.ErrorHandler.QxYjsUsSfJ8Ppa2c0A9(Object )
    at WDG.Automation.Language.ErrorHandler.JS7PK8C2uJ(Exception )
    at WDG.Automation.Language.ErrorHandler.HandleExecutionExceptionIfNeeded(Exception exception, IAutomationCommand command)
    at WDG.Automation.Language.CommandInterpreter.<Run>d__12.aSspMlbQaFx6MjV3Xot(Object , Object , Object )
    at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
    — End of stack trace from previous location where exception was thrown —
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at WDG.Automation.Language.ScriptInterpreter.<RunCore>d__17.MoveNext()
    —> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.

    Server stack trace:
    at WDG.Automation.Runtime.WindowVariant.get_Title()

    Exception rethrown at [0]:
    at DynamicExpresso.Lambda.InvokeWithUsedParameters(Object[] orderedArgs)
    at WDG.Automation.Language.DynamicExpressoFacade.o1SrZDUhMqAUo2RrwRR(Object , Object , Object )
    at WDG.Automation.Language.DynamicExpressoFacade.Eval(String expressionText)
    at WDG.Automation.Language.AutomationExtensions.cwhsZKVB3UM8t8OKNON(Object , Object )
    at WDG.Automation.Language.AutomationExtensions.Evaluate(IAutomationContext context, String text)
    at WDG.Automation.Language.AutomationExtensions.wqBnAhVDs1oMhVEtAhr(Object , Object )
    at WDG.Automation.Language.AutomationExtensions.Evaluate(IAutomationContext context, IAutomationCommand command)
    at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()<—

    #227133
    Anonymous
    Inactive

    We haven’t been able to identify what’s actually going on, but here’s what we’ve noticed.  Version 20.7.1 stopped working entirely (used to work at one point) and 20.7.2 is hit or miss.  A fresh install of version 20.7.3 worked consistently and was much faster, until it suddenly stopped working.

    We found numerous problems with trying to automate the calculator.

    1. Launch and Attach Window was never able to run successfully. A combo of Run and Find Window commands (in lieu of Launch and Attach Window) was needed to get it to work.
    2. If you use a Find Window command with the title of Calculator (only), it returns the PID for the Process Name of ApplicationFrameHost & Class Name of ApplicationFrameWindow, which is incorrect.
    3. If you use a Find Window command with a Class Name of Windows.UI.Core.CoreWindow and a title of Calculator, it will work.  For us, it was the most consistent with these properties, but we also would experience a sudden failure, which we still haven’t been able to figure out.  Please post if you know what’s causing it.  (Performing a reboot after posting this to see if that fixes it.)

     

    Run returns the wrong PID (Process ID):

     

    Use the following 2 properties to find the calculator window:

    We found the Class Name shown above by using the Recorder and inspecting the calculator window.

    #227134
    Anonymous
    Inactive

    Update:  A computer reboot fixes the issue, temporarily.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.