Hi all,
Currently, I am trying to use click activity to select a particular file base on the 8 digit date in a folder (example: selecting the file that contains “20191130” in the name). There are 2 files “COAMAL_W_20190930_09.xml” and “COAMAL_W_20191130_09.xml” in the folder.
Noted that if the files are in the desktop, I can replace the selector (ctrl name='COAMAL_W_20191130_09.xml’ role=‘list item’) with (ctrl name=‘date’ role=‘list item’) with date being a changing string variable that will contain “20191130”. ( wildcard is added to date ) By doing so the click activity is able to select the correct file COAMAL_W_20191130.xml.
<wnd app=‘explorer.exe’ cls=‘WorkerW’ idx=‘1’ /
<wnd cls=‘SysListView32’ title=‘FolderView’ /
<ctrl name=‘COAMAL_W_20191130_09.xml’ role=‘list item’ /
However when the files are placed in a folder , I have changed the same ctrl name = ‘Items View’ to ctrl name = ‘date’, the click activity is unable to determine which file to click. I understand that ctrl automationid=‘0’ in the selector is pointing the click activity to select the first file. After omitting the tag, the click function still does not select the file with “20191130”.
<wnd app=‘explorer.exe’ cls=‘CabinetWClass’ title=‘downloadFiles’ /
<wnd cls=‘ShellTabWindowClass’ title=‘downloadFiles’ /
<wnd aaname=‘Explorer Pane’ cls=‘DirectUIHWND’ /
<wnd aaname=‘Shell Folder View’ cls=‘SHELLDLL_DefView’ title=‘ShellView’ /
<wnd aaname=‘Items View’ cls=‘DirectUIHWND’ /
<ctrl name=‘Items View’ role=‘list’ /
<ctrl automationid=‘0’ /
<ctrl automationid=‘System.ItemNameDisplay’ /
Which part of the selector above do I need to modify to add the variable ‘date’ (with wildcard) that contains “20191130” to get the click activity to select COAMAL_W_20191130.xml?![image|690x227]
Thank you all.