Java8 for iOS Appium testng test


I am testing both an iOS and an Android native app with Appium/TestNG and my automation code is cross platform but only supports java8. I build my zip and run my tests successfully on Android, but on iOS, the java version that I am finding is java 12. I searched this forum and saw that previously someone had the opposite issue (needed java > 8) and their workaround was to install the jdk and do the exports. I have that approach working, but am wondering if there a way in the Test Spec to specify java8 (so I don't have to provide it)?

asked 2 years ago36 views
3 Answers

Try adding the following code instead, since a binary of Java8 is included with the test host:

export JAVA_HOME=/usr/libexec/java_home -v 1.8
java -version


answered 2 years ago

Hi hclmobiletests ,

Those are the standard mode settings, No we currently don't provide a direct mechanism for customer to be able to select java versions.
Using Custom Mode settings is the only way to do that today.(Which you have already verified works)

answered 2 years ago

hi, Could you share sample custom mode settings script that install jdk1.8 and do the export with me?
I tried this one but it didnt work.


answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions