iOS: Error: Could not parse plist file

1,090 views
Skip to first unread message

Pramod Sadaphal

unread,
Jul 4, 2013, 11:06:36 AM7/4/13
to appium-...@googlegroups.com
Hi,


I am using MacBook Air, OSX10.8, Xcode 4.6.2, iOS Simulator 6.1


My code:

import java.io.File;

import java.net.URL;

import java.util.List;


import junit.framework.Assert;


import org.junit.Before;

import org.junit.Test;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.remote.CapabilityType;

import org.openqa.selenium.remote.DesiredCapabilities;

import org.openqa.selenium.remote.RemoteWebDriver;

//import org.testng.Assert;

//import org.testng.annotations.AfterMethod;

//import org.testng.annotations.BeforeMethod;

//import org.testng.annotations.Test;


public class TestRecipe {


 public WebDriver driver = null;


 @Before

 public void setUp() throws Exception {

  // set up appium

  File appDir = new File("/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator");

  File app = new File(appDir, "Recipe.app");

  DesiredCapabilities capabilities = new DesiredCapabilities();

  capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");

  capabilities.setCapability(CapabilityType.VERSION, "6.1");

  capabilities.setCapability(CapabilityType.PLATFORM, "Mac");

  capabilities.setCapability("app", app.getAbsolutePath());

  driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);

 }

/*

 @AfterMethod

 public void tearDown() throws Exception {

  driver.quit();

 }*/



 @Test

 public void testAddRecipes() throws InterruptedException {


  driver.findElement(By.name("Add")).click();

  

  String recipeName = "Pizza";

  String recipeDescription = "My lovable dish";

  String preparationTime = "1 hour";


  driver.findElement(By.name("Add")).click();

  driver.findElement(By.xpath("//textfield[1]")).sendKeys(recipeName);

  driver.findElement(By.name("Save")).click();


  driver.findElement(By.name("Edit")).click();


  driver.findElement(By.xpath("//tableview[1]/textfield[2]")).sendKeys(recipeDescription);

  driver.findElement(By.xpath("//tableview[1]/textfield[3]")).sendKeys(preparationTime);


  driver.findElement(By.name("choosePhoto")).click();

  driver.findElement(By.xpath("//tableview[1]/cell[1]/text[1]")).click();

  driver.findElement(By.xpath("//tableview[1]/cell[1]/image[1]")).click();

  driver.findElement(By.name("Done")).click();


  driver.findElement(By.xpath("//navigationBar[1]/button[1]")).click(); 


                // Verify the presence of added recipe.

  List<WebElement> recipesDetails = driver.findElements(By.xpath("//tableview[1]/cell"));

  //System.out.println("No. of Recipes: "+recipesDetails.size());

  boolean result = false;

  for(WebElement recipeDetails : recipesDetails) { 

   //System.out.println("details: "+recipeDetails.getAttribute("name"));

   if(recipeDetails.getAttribute("name").equals(recipeDescription+", "+preparationTime+", "+recipeName)) {

    result = true;

   }

  }

  //Assert.assertTrue(result, "Recipe is not present");

  driver.quit();

 }


}


and getting following error,

info: Welcome to Appium v0.7.3 (REV 120bb6813272efc128276bd212202e2cda0dea14)


info: Appium REST http interface listener started on 0.0.0.0:4723

info: socket.io started


info: Using local app from desiredCaps: /Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app


info: Creating new appium session 68a84fbf-1329-4fa7-90c2-c4206b3091ca


info: Cleaned up instruments socket /tmp/instruments_sock

info: Forcing use of iphone

info: Overriding session id with ,

info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist')","errno":34,"code":"ENOENT","path":"/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist","origValue":"ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist'"},"sessionId":null}


POST /wd/hub/session 500 31ms - 568

info: Clearing out appium devices


debug: Appium request initiated at /wd/hub/session


debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app","browserName":"iOS","version":"6.1"}}

error: Could not parse plist file at /Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist

error: Failed to start an Appium session, err was: Error: ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist'


debug: Appium request initiated at /wd/hub/session


info: Using local app from desiredCaps: /Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app


debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app","browserName":"iOS","version":"6.1"}}

error: Could not parse plist file at /Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist

error: Failed to start an Appium session, err was: Error: ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist'


info: Creating new appium session 58ecd8a6-69a9-48b5-84c5-c2cd738f2d89

info: Cleaned up instruments socket /tmp/instruments_sock

info: Forcing use of iphone

info: Overriding session id with ,

info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist')","errno":34,"code":"ENOENT","path":"/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist","origValue":"ENOENT, open '/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist'"},"sessionId":null}

POST /wd/hub/session 500 5ms - 568

info: Clearing out appium devices


Pramod Sadaphal

unread,
Jul 5, 2013, 6:05:10 AM7/5/13
to appium-...@googlegroups.com
please reply if any one has solution....or i m missing something......

bootstrap online

unread,
Jul 5, 2013, 7:42:04 PM7/5/13
to Pramod Sadaphal, appium-...@googlegroups.com
Is your plist binary or xml?
https://github.com/appium/appium/issues/853
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups
> "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Pramod Sadaphal

unread,
Jul 6, 2013, 7:54:11 AM7/6/13
to appium-...@googlegroups.com, Pramod Sadaphal
hey...how to check Info.plist is xml or binary???
I assumed that it is xml and converted it to binary by running command "plutil -convert binary1 Info.plist" as per described in https://github.com/appium/appium/issues/853 , but still getting same issue.

bootstrap online

unread,
Jul 6, 2013, 9:20:54 AM7/6/13
to Pramod Sadaphal, appium-...@googlegroups.com
Open it in a text editor. If you see xml then it's xml.

On Sat, Jul 6, 2013 at 7:54 AM, Pramod Sadaphal

Jonathan Lipps

unread,
Jul 6, 2013, 2:06:14 PM7/6/13
to bootstrap online, Pramod Sadaphal, appium-...@googlegroups.com
the "ENOENT" error means the Info.plist file doesn't even exist.

AFAIK, all apps are supposed to have this.
Message has been deleted

Pramod Sadaphal

unread,
Jul 10, 2013, 7:24:20 AM7/10/13
to appium-...@googlegroups.com, bootstrap online, Pramod Sadaphal
Hi,

Is there any update on this.

I downloaded another project "iPhoneMixerEQGraphTest" from apple developer site and automation started successfully on it. I looked for its Info.plist file and i found it as xml. I haven't converted xml into binary, still it worked for me.

You can diagnose issue by downloading "iPhoneCoreDataRecipes" project from apple developer site.

OR should i open issue for this??

thanx,

Jonathan Lipps

unread,
Jul 10, 2013, 1:01:15 PM7/10/13
to Pramod Sadaphal, appium-...@googlegroups.com, bootstrap online
Are you saying the file

/Users/broadsoft/Documents/testing/iPhoneCoreDataRecipes/build/Release-iphonesimulator/Recipe.app/Info.plist

exists? If it exists, what are its permissions?

Vikas Chaudhary

unread,
Apr 29, 2014, 9:03:58 PM4/29/14
to appium-...@googlegroups.com, Pramod Sadaphal, bootstrap online
Hi All,

I am also getting the same error "could not parse plist file at /var/folders/yb/....../myApp.app/en.lproj/

so appium is trying to search info.plist in the some location wherease actually it lies in /var/folders/yb/....../myApp.app/ for me. So question is how can I change this path in appium so that it start looking for info.plist in the correct directory. Please help.

Thanks
Vikas
Reply all
Reply to author
Forward
0 new messages