title: The control could not be found by id. SAP GUI bug?
body: <p>I am trying to automate SAP data extraction using scripting. The problem I am facing is a recorded script in SAP isn't working when I'm running it, when I use <code>findById("id")</code> method it comes out that cannot be found, however the tabs are there.</p>
  
  <p>The idea is to move between the tabs (using <code>session.findById("id").Select</code>) to extract info in that panels. Use a list of po's, make a loop and extract the information, it's simple.</p>
  
  <p>However, these tabs aren't found randomly. Sometimes it works, sometimes it is not found. All PO's (if I do it manually) have tabs with the data, but in the script it doesn't work.</p>
  
  <p>For example:</p>
  
  <p>The red box is the tabs that I am trying to select
  <a href="https://i.stack.imgur.com/9dILR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9dILR.png" alt="SAP:"></a>
  Output of the recorded script (just mooving between tabs):</p>
  
  <pre><code>    If Not IsObject(application) Then
         Set SapGuiAuto  = GetObject("SAPGUI")
         Set application = SapGuiAuto.GetScriptingEngine
      End If
      If Not IsObject(connection) Then
         Set connection = application.Children(0)
      End If
      If Not IsObject(session) Then
         Set session    = connection.Children(0)
      End If
      If IsObject(WScript) Then
         WScript.ConnectObject session,     "on"
         WScript.ConnectObject application, "on"
      End If
      session.findById("wnd[0]").resizeWorkingPane 183,24,false
  
  session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT13").select
  ' Extract info
  session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0019/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT15").select
  ' Extract info
  session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT18").select
  ' Extract info
  </code></pre>
  
  <p>Error:
  <a href="https://i.stack.imgur.com/Fj5Gu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fj5Gu.png" alt="enter image description here"></a></p>
  
  <p>Im using:
  <a href="https://i.stack.imgur.com/CBso9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CBso9.png" alt="enter image description here"></a></p>
  
  <p>My theory, the tab is hidden and doesn't find it, that I would have to use the arrows to move, however when I use the arrows at the time of making the script recording, it simply doesn't add them to the code. </p>
  
  <p>Sorry for my English, and thanks in advance for your time.</p>