application.output('SelectedTabFormName: '+elements.main.getSelectedTabFormName());
Do you see getSelectedTabFormName() in the method editor?
It is depricated you should use:
elements.main.getTabFormNameAt(elements.main.getTabIndex())
depricated stuff are not supported anymore in the webclient. So you have to use the new onces.