Changdeo Jadhav
Changdeo Jadhav

Reputation: 706

Can I launch app which is installed on iPhone using appium without providing .app path

I want to launch an already installed app on iPhone/iOS simulator without providing .app or .zip path. Since I do not have those files with me now. Is it possible? Can I launch by just providing bunddle Id. Thanks in advance

Upvotes: 4

Views: 6208

Answers (3)

Mike Akers
Mike Akers

Reputation: 12247

So it sounds like you want to automate playing games on your iPhone to measure the battery usage while an arbitrary game is being played right?

There are many problems that could make this difficult, but one is that whatever tool you use to automatically play the game will consume additional power on the device, you could probably take some baseline measurements to correct for this, but that's additional work. Also like @sheeptest mentioned, most test frameworks require a USB connection to command the device and USB will charge the phone.

Another thing to consider is that batteries, being chemical devices, do wear out over time. Wha you really want to know is how many watts the phone is drawing while playing the game, and then from that you can calculate how long an ideal iPhone battery can power the phone while supplying that many watts. This will be difficult to calculate if you just measure how long the battery lasts due to battery wear.

Here's what I would consider if I had to measure the battery consumption while playing an arbitrary game on an iPhone:

  1. Hire a temp worker from a temp agency or craigslist to play the game for you. Much cheaper than trying to build an automated system to play arbitrary games.
  2. Power the phone via USB and connect a logging multimeter to the power leads within the USB cable.
  3. Set the multimeter to measure amps.
  4. Start capturing data from the multimeter.
  5. Tell your temp worker to live the dream and get payed to play candy crush
  6. While the game is being played you'll be able to monitor and log the current being drawn by the phone.
  7. When the phone dies you should be able to use the tools that came with the multimeter to find out how many watts of electricity were used during the test.

Upvotes: 0

Jess
Jess

Reputation: 3146

YES! You can pass in the bundleId and it will find the application if it is already installed on the iPhone. You do not need to have the .app or .ipa file if the app is already installed on the device.


Sidenote, it seems you may not have access to another copy of the app....

If you are running on the simulator:

You can find the app in the ~/Library/Application Support/iPhone Simulator/7.1/Applications/ folder. By default, Appium will delete everything in that folder if the --no-reset flag is not set when you start the Appium server. You should move the .app file to another folder like ~/projects/automation/app if you do not have another copy of it!

Upvotes: 3

miho
miho

Reputation: 12085

Due to my knowledge only accepts paths to .app files. BUT:

When an *.app is installed on the simulator device it is stored at:

~/Library/Application Support/iPhone Simulator/User/Applications/

So, just pass a link to the .app there will launch the application too.

Upvotes: -1

Related Questions