move getting name and control type before calling invoke method to avoid possible crash
move getting name and control type before calling invoke method to avoid possible crash

cetygamer/pywinauto,vasily-v-ryabov/pywinauto,airelil/pywinauto,pywinauto/pywinauto,drinkertea/pywinauto