title: driver.navigate().back(); isn't working in appium ios
body: <p>I just started working in automated ios testing.I got the Button elements of launch page of an application using driver.getPageSource(). I have added my button elements to an ArrayList.</p>
  
  <pre><code>ArrayList&lt;String&gt; buttonresourceIds = pasr.XmlParser("/Users/Desktop/Testing.txt");
  </code></pre>
  
  <p>i'm trying to iterate the array using a loop to find the clickable button elements </p>
  
  <pre><code>for (int i=0; i&lt;=buttonresourceIds.size(); i++)
      {
          //driver.findElementByName(buttonresourceIds.get(i)).isDisplayed();
          if(driver.findElementsByName(buttonresourceIds.get(i)) != null){
              WebElement button=driver.findElementByName(buttonresourceIds.get(i));
              button.click();
              try {
                  Thread.sleep(5000);
              } catch (InterruptedException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
          }
  
              ((IOSDriver&lt;WebElement&gt;) driver).navigate().back();
      }
          else
  
          {
      continue;
          }
  
          System.out.println("clicking:"+buttonresourceIds.get(i));
         driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
         System.out.println(i);
         System.out.println("pass");
  
  
      }
    }
  </code></pre>
  
  <p>i'm able to click the widgets using the above snippet but ((IOSDriver) driver).navigate().back(); or driver.navigate().back() isn't working in appium ios.when i click the back button on the top right corner of the screen manually it works perfectly fine. but it isn't working in an automated way. Am i missing out something. Any working example would be really helpful. Thanks in advance.    </p>