title: iPhone automation - web testing
body: <p>Every time I launch a script, instead of automating the login page, driver takes session from previous script. I am running the script on iPhone simulator. I am also resetting the device. Please refer the above code for more info,</p>
  
  <pre><code>ServerArguments serverArguments = new ServerArguments();
  serverArguments.setArgument("--address", "127.0.0.1");
  serverArguments.setArgument("--no-reset", false);
  serverArguments.setArgument("--command-timeout", 2400);
  serverArguments.setArgument("--local-timezone", true);
  serverArguments.setArgument("--full-reset", true);
  this.appiumServer = new AppiumServer(new File("/usr/local/bin/node"), new File("/usr/local/lib/node_modules/appium/build/lib/main.js"),serverArguments);
              this.appiumServer.startServer();
  </code></pre>
  
  <p>I am using Genium framework for starting/stopping appium server.</p>
  
  <p>I am setting the above capabilities in DesiredCapabilities class,</p>
  
  <pre><code>capabilities.setCapability("platformName", "iOS");
  capabilities.setCapability("udid", udid);
  capabilities.setCapability("browserName", "Safari");
  if (!platformVersion.equals("")) {
      capabilities.setCapability("platformVersion", platformVersion);
  }
  capabilities.setCapability("deviceName", deviceName);
  capabilities.setCapability("autoWebview", true);
  capabilities.setCapability("newCommandTimeout", 120);
  </code></pre>