Dynamic window title keeps crashing workflow

Dear All,

I might have a chicken/egg problem which I could not solve up to now.

Following is envisaged.

  • a Java/Applet is used to generate tickets;
  • each ticket (with a unique ticket id) needs to be printed as pdf and then saved.

Problem:

  • Identifying the repesective java window is not reliable and workflow is terminated.

Solution attempt:

  • read out window title as text in a variable;
  • put this variable as dynamic selector into the subsequent activities using this window to read out further text/press buttons/etc;
  • note: “Attach Window” activity is the only one left which uses the below non-dynamic selector (although ticket id (like: #123456) is already made dynamic with asterix ‘*’ (see error info below)

Workflow keeps on breaking down from time to time with either error info:

Error,Unattended,"360T.Load.CSV Part: Could not find the UI element corresponding to this selector: wnd app='java.exe’ cls=‘GlassWndClass-GlassWindowClass-*’ title='Ticket for # '/>
The closest matches found are:
|[67%] wnd app=‘java*.exe’ cls=‘GlassWndClass-GlassWindowClass-'/>
|[67%] wnd app='java
.exe’ cls=‘GlassWndClass-GlassWindowClass-’ title=‘Product Definition’/>
|[67%] wnd app='java
.exe’ cls=‘GlassWndClass-GlassWindowClass-*’ title=‘Home Screen’/>

or:

Error,Unattended,360T.Load.CSV Part: Invalid UI node.

Read out of text title is done via:

  • Attach Window (with following selector: ’ wnd app=‘java*.exe’ cls=‘GlassWndClass-GlassWindowClass-*’ title=‘Ticket for # *’ />)
  • Output stored in a Window variable
  • Titel read out via .Get(“title”).toString

Can someone give an advice how to read out the respective window title without being required to identity the window with the above selector?

Many thanks
Björn

You can’t. You always have to identify objects with selectors, it’s the foundation of UI automation.

Invalid UI node typically means that you’ve identified and attached to the UI element (with its internal Windows properties) and then the element no longer exists. I see this with Citrix automation where you think it’s still the same window, but it isn’t. Something under the hood has refreshed and Windows sees it as a different object. This could be your issue, and in this case the solution is to re-attach with Use Application/Browser or Attach Window.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.