title: "Element not found" issue occurred from time to time
body: <p>I have written a code and it has 4 areas and my code is a little bit longer. When I compile all 4 areas within one attempt, sometimes the code is working properly, but sometimes not and it is shown below error;</p>
  <blockquote>
  <p>Element with locator ‘xpath=//input[@id=‘submit3’]’ not found.</p>
  </blockquote>
  <p>This is the code part that related to my question,</p>
  <pre><code>    click element  xpath://html/body/app-root/div[1]/app-sidebar/div/ul/li[5]/a/p
      sleep  10s
     
      input text   ${LOCATOR_Card_Number}     ${Card_Number}
      Sleep  1s
      input text   ${LOCATOR_code}    ${code}
      
      IF    ${Card_Number} != 111111
              sleep  2s
              Click Button     xpath=//input[@id='submit3']
              click element  xpath://html/body/div/div[2]/table[3]/tbody/tr[2]/td/center/table/tbody/tr/td[1]/form/small/input
  
              Sleep  2s
              alert should be present
  
              #Click ok button
              click element   xpath=//form/input
              Sleep    25s
              
           ELSE IF    ${code} != 10
              sleep  2s
              Click Button     xpath=//input[@id='submit3']
  
              Alert Should Be Present       The value entered is incorrect: 'code'   DISMISS    1s
              sleep  20s
              click element  xpath://html/body/div/div[2]/table[2]/tbody/tr[2]/td/center/table/tbody/tr/td[2]/form/small/input
  
              Sleep  2s
              alert should be present
  </code></pre>
  <p>If I compile only one area (By commenting other three areas) it works fine. Otherwise, most of the time, it displays the error that I mentioned earlier. I want to compile the whole code within one attempt.</p>
  <p>And also sometimes, the XPaths that worked previous days are not working now. So, I have to find those Xpaths so many times.</p>
  <p>I searched about this matter to find the solution but I couldn’t do it.
  So, I want to know the reasons for the above-mentioned problems and need your suggestions and solutions to solve those issues.</p>