As per title, I am unable to find a stable selector for the element in Excel 16’s Print Menu which allows you to enter the Page you want to type from:
I have used a regular selector for it by using “indicate element on screen”, UiExplorer to get a more complete selector, and using “record” which prompted me to set an anchor (as the selector is unstable), which I selected the text “Pages” for. None of these selectors seem to work.
To make this potentially more complicated, I am running the bot on a VM, and developing on my laptop, so I’m using my Excel to find the selector, where it more often than not works, but on the VM it never works. The VM is running the same version of Excel I am however.
These are the ones generated by the Recording tool, and I just ran on my laptop and it worked, but still won’t find these on the VM which is running the same Excel.
Thanks
Edit: Expanded selector for the action is:
<wnd app='excel.exe' cls='XLMAIN' />
<ctrl name='Pages:' role='editable text' />
Its always working on your local machine but not at all on the VM?
I can suggest, you do like this.
In the anchor use a find element which will find the textbox element for you.
And then in your type into, do not indicate, rather pass the findElement output element var in the properties–>Element
That way input field selector will always get the stable selector for input field.
Note: Use Activate, ClickBeforeTyping options
Not sure if it will solve your VM related issue. But if its stabilizing the text box selector this should help.
I’ve managed to get round this, I was only needing this as I didn’t want to print the first tab of the workbook, so instead I have just hidden it and I get the same result. Thanks anyway, when this project is finished I will come back to this and make it work! Right now I don’t have time