This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
50 / 50
Mar 2016

Oh! U too stucked with the simulator issue. Might be this is the Appium 1.4.13 issue with ios 9.0 in simulators then .... :frowning:

So I guess that's a "No" on you attempting to contact the teams to see if they are ever going to release updated versions of the .app.

I understand they are aware of the release. However, it has been nearly two months since the last release and they have not commented on your request with a release timeline. So I had hoped that you, a member of the Appium Team, could ask them if they were planning on releasing a new version of the .app. That was clearly unrealistic, so I will comment on the github request.

Hi Scott,
I encountered these issues while using Appium version 1.4.13.

I'm trying to use one type of install to get both iOS and Android to work.

If I install appium via cloning Git using ./reset.sh , I have issue with installing for Android and it gives error when running iOS Simulators, but runs fine with a real iPhone Device.

If I install appium via npm, I have issue with it not installing SafariLauncher properly for real iOS device, gets error with iOS simulators, and getting an error with running on real Android device, but it runs fine with Android Simulators.

I spent hours on sorting out the issues and logging them into a bug report.

Issues Reported:
https://github.com/appium/appium/issues/571011

https://github.com/appium/appium/issues/57087

https://github.com/appium/appium/issues/570612

https://github.com/appium/appium/issues/570514

I think these are valid issues, but please pardon my unfamiliarity with Appium if these issues ends up being a setup issue. Please let me know how I can fix these issues.

Thank you for your help.

Hello, I'm having a problem using the GUI app of Appium, when i start the server I get the following error:

error: uncaughtException: Cannot find module 'appium-instruments' date=Mon Oct 12 2015 13:11:25 GMT+0100 (WEST), pid=9985, uid=501, gid=20, cwd=/Applications/Appium.app/Contents/Resources/node_modules/appium, execPath=/Applications/Appium.app/Contents/Resources/node/bin/node, version=v0.12.7, argv=[/Applications/Appium.app/Contents/Resources/node/bin/node, /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/main.js, --command-timeout, 7200, --debug-log-spacing, --platform-version, 8.1, --platform-name, iOS, --app, /Users/manaljazouli/Downloads/screendy.app, --full-reset, --show-ios-log, --device-name, iPhone 6], rss=77594624, heapTotal=61778432, heapUsed=26590200, loadavg=[1.779296875, 1.46630859375, 1.45458984375], uptime=83202, trace=[column=15, file=module.js, function=Function.Module._resolveFilename, line=336, method=Module._resolveFilename, native=false, column=25, file=module.js, function=Function.Module._load, line=278, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=365, method=require, native=false, column=17, file=module.js, function=require, line=384, method=null, native=false, column=14, file=/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/instruments.js, function=, line=4, method=null, native=false, column=26, file=module.js, function=Module._compile, line=460, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=478, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=355, method=load, native=false, column=12, file=module.js, function=Function.Module._load, line=310, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=365, method=require, native=false, column=17, file=module.js, function=require, line=384, method=null, native=false, column=19, file=/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js, function=, line=15, method=null, native=false, column=26, file=module.js, function=Module._compile, line=460, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=478, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=355, method=load, native=false, column=12, file=module.js, function=Function.Module._load, line=310, method=Module._load, native=false], stack=[Error: Cannot find module 'appium-instruments', at Function.Module.resolveFilename (module.js:336:15), at Function.Module.load (module.js:278:25), at Module.require (module.js:365:17), at require (module.js:384:17), at Object. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/instruments.js:4:14), at Module.compile (module.js:460:26), at Object.Module.extensions..js (module.js:478:10), at Module.load (module.js:355:32), at Function.Module.load (module.js:310:12), at Module.require (module.js:365:17), at require (module.js:384:17), at Object. (/Applications/Appium.app/Contents/Resources/nodemodules/appium/lib/devices/ios/ios.js:15:19), at Module.compile (module.js:460:26), at Object.Module.extensions..js (module.js:478:10), at Module.load (module.js:355:32), at Function.Module._load (module.js:310:12)]

4 months later

I follwed these instructions :slightly_smiling:
http://www.6020peaks.com/2016/02/mobile-automation-testing-for-android-with-appium/4

At this point, I am getting error message :

karthik@dkarnik2-Vostro-3558:~/latestappium$ git clone git://github.com/appium/appium.git
Cloning into 'appium'...
remote: Counting objects: 37387, done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 37387 (delta 35), reused 0 (delta 0), pack-reused 37297
Receiving objects: 100% (37387/37387), 36.15 MiB | 132.00 KiB/s, done.
Resolving deltas: 100% (23726/23726), done.
Checking connectivity... done.
karthik@dkarnik2-Vostro-3558:~/latestappium$ cd appium
karthik@dkarnik2-Vostro-3558:~/latestappium/appium$ ./reset.sh —android --verbose
bash: ./reset.sh: No such file or directory
karthik@dkarnik2-Vostro-3558:~/latestappium/appium$ ls
AUTHORS CHANGELOG.md CONTRIBUTING.md GOVERNANCE.md lib npm-shrinkwrap.json packweb.json RELEASE.pdf test
bin CONDUCT.md docs gulpfile.js LICENSE package.json README.md ROADMAP.md
karthik@dkarnik2-Vostro-3558:~/latestappium/appium$

There is no reset.sh file in appium.. What am i supposed to do now ?? How can i install Appium ??

@Karthik_Uppoor, @kim-klask

I think the dependencies of Appium have been moved out of the project into individual NPM packages. If I understood the project correctly, the reset.sh script was for ensuring Appium's dependencies were present.

To set up Appium's dependencies now, you can run "npm install" inside Appium's project directory now. NPM should read the package.json file and install the dependencies from there.

@afwang

Can you please explain me in detail, where should I write the test cases, to run on android device. Am kinda new to Appium. Explain with a simple test case (if possible).

After I run these commands :
npm install -g appium
appium

I am getting this :

info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug

When I visit the site http://0.0.0.0:4723/wd/hub/status2 I get this on the web page:
{"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}

and this in the terminal :
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}
info: <-- GET /wd/hub/status 304 17.101 ms - - {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}}}

appium-doctor --android gives me this :

karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13$ appium-doctor --android
Running Android Checks
✔ ANDROID_HOME is set to "/home/karthik/selenium/android-sdk-linux"
✔ JAVA_HOME is set to "/usr/lib/jvm/java-7-openjdk-amd64."
✔ ADB exists at /home/karthik/selenium/android-sdk-linux/platform-tools/adb
✔ Android exists at /home/karthik/selenium/android-sdk-linux/tools/android
✔ Emulator exists at /home/karthik/selenium/android-sdk-linux/tools/emulator
✔ Android Checks were successful.

✔ All Checks were successful
karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13$

Appium works on a client-server model. Appium acts as the server, and your test cases behave as the client. If you have ever used Selenium hub before, launching a test with Appium is closely similar.

Without using a specific language, the basic steps you want to take to start a test with Appium are:

  1. Instantiate an Appium driver using the "http://0.0.0.0:4723/wd/hub" URL. If Appium is running remotely, you would use "http://(IP address of Appium's machine):(port Appium server is listening on)/wd/hub"
  2. Use the various WebDriver API commands to interact with the device.
  3. End the driver session.

A quick example in Java:

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "Android");
caps.setCapability("deviceName", "Android");
caps.setCapability("app", "/path/to/apk");
AppiumDriver<MobileElement> driver = new AppiumDriver<>(new URL("http://localhost:4723/wd/hub"), caps);
//Find a TextView element on the screen
MobileElement text = driver.findElement(By.className("android.widget.TextView"));
System.out.println("TextView's text is: "+ text.getText());
//Click the text view
text.click();
//driver.tap(1, text, 1); would work as well
driver.quit(); // End the session

No, the GUI version is not available for Linux systems. For my Linux systems, I install Appium using NPM, or I run it from source.

Hello @afwang
Thanks a lot for helping me in setting up Appium..

I am running this python code:

import os
import unittest
from appium import webdriver
from time import sleep

class ChessAndroidTests(unittest.TestCase):
"Class to run tests against the Chess Free app"
def setUp(self):
"Setup for the test"
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.4.2'
desired_caps['deviceName'] = 'karthikphone1'
# Returns abs path relative to this file and not cwd
desired_caps['app'] = '/home/karthik/appiumworkspace/tests/uk.co.aifactory.chessfree.apk'
desired_caps['appPackage'] = 'uk.co.aifactory.chessfree'
desired_caps['appActivity'] = '.ChessFreeActivity'
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

def test_single_player_mode1(self):
    "Test the Single Player mode launches correctly"
    element = self.driver.find_element_by_name("PLAY!")
    element.click()
    self.driver.find_element_by_name("Continue...").click()
self.driver.find_element_by_name("Single Player").click()

def tearDown(self):
    "Tear down the test"
    self.driver.quit()

#---START OF SCRIPT
if _ name _ == '_ main _':
suite = unittest.TestLoader().loadTestsFromTestCase(ChessAndroidTests)
unittest.TextTestRunner(verbosity=2).run(suite)

I have connected my device to the notebook..
I get this error output :frowning:

karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13/submodules/sample-code/examples/python$ python android_chess.py
test_single_player_mode1 (main.ChessAndroidTests)
Test the Single Player mode launches correctly ... ERROR

======================================================================
ERROR: test_single_player_mode1 (main.ChessAndroidTests)
Test the Single Player mode launches correctly


Traceback (most recent call last):
File "android_chess.py", line 25, in test_single_player_mode1
self.driver.find_element_by_name("Continue...").click()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 330, in find_element_by_name
return self.find_element(by=By.NAME, value=name)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 712, in find_element
{'using': by, 'value': value})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
NoSuchElementException: Message: An element could not be located on the page using the given search parameters.


Ran 1 test in 13.961s

FAILED (errors=1)
karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13/submodules/sample-code/examples/python$

Here are the screenshots of the app :

It first successfully clicks on "PLAY!" button, and in the next page it was supposed to click on "Continue..." button.
Am not able to understand, why its giving me error message..!!! (An element could not be located on the page using the given search parameters.)
While Button named "Continue..." is actually present in the app..
Is it trying to find button in the first page itself ??
Help me again..

I'm not too sure about the details of the app you're testing, but it looks like the screen has to go through some sort of transition after you hit "PLAY!".

An important aspect of Appium is that it should be treated as a tool to help you build high-level, blackbox test cases. Unlike the Android Espresso framework, it will not perform any synchronization with the application under test, so if the application under test is going through a screen transition or some other operation where UI elements will not be immediately available, there will be a period of time where certain UI elements will not appear.

In your code, after you click on the PLAY! button, you immediately ask Appium to look for an element named "Continue...". However, note that at this point, the device you're testing on might not have finished transitioning the screen over and updated the UI hierarchy with the new layout. In this case, Appium rightfully throws a NoSuchElementException, because it did not find a Continue button while the screen is transitioning.

The solution is to add in a wait between clicking on the PLAY button and before searching for the continue button. There are a few methods of waiting when it comes to Selenium tests, but my personal favorite is to use a WebDriverWait. You can use WebDriverWait to check for a certain condition to be true before continuing on. I'm not too well-versed in Python, but there are some common condition checks that are already prepared. They should be listed here; their names should be self-explanatory.

Am using this app :

http://www.apkhotel.com/apk/844/3

I tried doing this :

def test_single_player_mode1(self):
    "Test the Single Player mode launches correctly"
    element = self.driver.find_element_by_name("PLAY!")
    element.click()
element = WebDriverWait(self.driver, 15).until(EC.presence_of_element_located((By.NAME, "Continue...")))
element.click()

I am getting this now :

karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13/submodules/sample-code/examples/python$ python android_chess.py
test_single_player_mode1 (main.ChessAndroidTests)
Test the Single Player mode launches correctly ... ERRORundefined> ======================================================================
ERROR: test_single_player_mode1 (main.ChessAndroidTests)
Test the Single Player mode launches correctly


Traceback (most recent call last):
File "android_chess.py", line 32, in test_single_player_mode1
element = WebDriverWait(self.driver, 15).until(EC.presence_of_element_located((By.NAME, "Continue...")))
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message:


Ran 1 test in 27.586s

FAILED (errors=1)
karthik@dkarnik2-Vostro-3558:~/appiumworkspace/appium-1.4.13/submodules/sample-code/examples/python$

Can you please try and get the solution for this ??

12 days later