I've copied the geoprocessing widget and set it up in web appbuilder to run a geoprocessing service that asks the user for an input polygon. After a successful run I want the tool to clear the map graphics and close the widget window.
It's asynchronous so I'm editing the onJobComplete method within Widget.js.
I followed instructions here to close the widget panel and that's working successfully.
It appears the widget uses a draw tools box within the editor. I'm not sure if I should just "click" the clear button or if there is a better solution..
How can I click the button using the attach-point name btnClear?
Thanks