I am trying to close excel after saving the file. I am using the click activity and to attempt to push the X on the close, upper right. I have used the “indicate on screen” twice the same way and got two different selectors and neither of them work.
<wnd app='excel.exe' cls='XLMAIN' title='cryptocurrencys.xlsm - Excel' /> <wnd cls='NetUIHWND' idx='1' /> <ctrl idx='3' name='Close' role='push button' />
<wnd app='excel.exe' cls='XLMAIN' title='cryptocurrencys.xlsm - Excel' /> <wnd cls='NetUIHWND' idx='2' /> <ctrl name='Ribbon' role='property page' /> <ctrl idx='1' name='Close' role='push button' />
as I said in my other Selectors Topic, “Understanding Selectors in Detail” I have not, so far, found anything that documents what the different parts of a selector mean. I have some indications of course but when one doesn’t work and throws and exception there is no help in figuring out which part of the selector is not recognized.
I am finding selectors flaky and fragile. They work for awhile then simply quit and throw exceptions.
Anyway can someone give me a clue why the “indicate on screen” gave me two different selectors and what is wrong with either of them so I can get excel to close reliably? Or another way would be fine. I tried a simple macro with application.quit but that threw and exception as well. ARGGGHHHH…I’m posting another topic on that one