Identifier 'PushButton' was not found in the Object Map.
クラス名以外のものも含む、より複雑なロケーター (PushButton[@caption=OK] など) の場合は、オブジェクト マップが存在する場合でも機能し続けます。
PushButton button = mainWindow.find("PushButton");その場合、コードを次のように変更してください:
PushButton button = mainWindow.find("//PushButton");