0

I have the url of an application, (not the .ipa file), how can i configure this url in appium? i don't have the path for that file. The application is coded by Angular JS. enter image description here

Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77
  • app path is the location of the .app/.ipa in your case on a physical storage. you can build the app and specify its path in the section – Naman Mar 28 '16 at 16:29

3 Answers3

2

If the problem is only The path, this is how i do it:

  1. zip the app folder (testapp.app.zip)
  2. put zip file in a folder (~/server/)
  3. open a terminal and cd to folder (cd ~/server)
  4. run command python -m SimpleHTTPServer 8000

Your application address is http://localhost:8000/testapp.app.zip.

This is done on the appium side, your test code can be anywhere. localhost is what appium see, so there is no problem if you run test from another system.

alizelzele
  • 892
  • 2
  • 19
  • 34
  • Thanks for your anwser, i have solved my problem differently by 2 methods 1) i put in URL the path for Debug-iphonesimulator/UICatalog.app 2) i run with npm and in cofiguration the app is safari – Emna Ayadi Apr 29 '16 at 10:53
  • happy that your problem is solved. you can not set path if you want to run test from remote device, for remote device you still need to set a url – alizelzele Apr 29 '16 at 12:03
  • 1
    Thanks, now i'm using : appium --default-capabilities '{"app":"safari","browserName":"safari","appium-version":"1.5.1","platformName":"iOS","platformVersion":"9.3","deviceName":"iPad Air","nativeInstrumentsLib":true}' --command-timeout "0" --pre-launch --nodeconfig "/Users/me/nodeconfig.json" --launch-timeout "180000" – Emna Ayadi Apr 29 '16 at 12:04
1

You can do it via your code,

capa = new DesiredCapabilities();    
capa.setCapability("app", "http://example.com/appname.ipa");

Providing the URL shouldn't have any credentials.

If its for safari use the below capabilities in the code not Appium gui

DesiredCapabilities capabilities=new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME,"Appium");

capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.IOS);

capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"7.1");

capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,"safari");

capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"iPhone Simulator");

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

driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);

driver.get("http://google.com");

Thread.sleep(4000);

driver.quit();
Calimo
  • 7,510
  • 4
  • 39
  • 61
karthick23
  • 1,313
  • 1
  • 8
  • 15
  • I'm using iOS not android, and the problem when i tap use mobile safari, i got an error before running my testng scripts by eclipse telling that it couldnt launch safari ! – Emna Ayadi Mar 24 '16 at 11:45
0

I have solved my problem by 2 ways :

  1. I put in URL the path for * > /Debug-iphonesimulator/UICatalog.app

  2. Adding app : "safari" and i run appium with npm version 1.5.5 like that :

    appium --default-capabilities '{"app":"safari","browserName":"safari","appium-version":"1.5.1","platformName":"iOS","platformVersion":"9.3","deviceName":"iPad Air","nativeInstrumentsLib":true}' --command-timeout "0" --pre-launch --nodeconfig "/Users/me/nodeconfig.json" --launch-timeout "180000"

Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77