Android devices, Noughat 7.0 or 7.1

What is the latest version of Appium which supports Android devices, Noughat 7.0 or 7.1

Still now i am seeing 1.4.16.1 for windows version does this version supports Noughat 7.0 or higher.

because in the Android API version as 23, but Noughat supports API 24, how to overcome this

Please help

One more clarification i can see only updates for apple devices appium 1.5.3.dmg do this supports Windows aslo…

try install “npm” on Windows and use latest Appium version example - http://blog.teamtreehouse.com/install-node-js-npm-windows

Hi I didn’t get your point, how do the latest Appium version will work in windows PC as it is available only in .dmg format(iOS).

Latest appium not in dmg.

can you please share the download location of the latest Appium which supports Android Nougat

you need to install it as: “npm -g install appium” thus you need to install “npm” first.

Thanks it worked.

I have an another clarification, the below command got executed in Appium version 1.4.16.1 but the same is not working in 1.6.3 version, how can i resolve this

driver.findElementByName(“MY_APP”).click();

this line launched my application under test from the device home screen

driver.findElement(MobileBy.name(“some_name”))
driver.findElementsByIosUIAutomation(".elements().withName(“Some_name”)") - iOS

Hi

can you send the above command for Android

still facing the same problem

used the command
driver.findElement(MobileBy.name(“MyApp”)).Click();

appium 1.4.16.1 it is working debug messages as follows

info: → POST /wd/hub/session/78d80129-b6b0-42a6-8a8d-77491efea950/element {“using”:“name”,“value”:“MyApp”}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“name”,“selector”:“MyApp”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“name”,“selector”:“MyApp”,“context”:“”,“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding MyApp using NAME with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=MyApp, INSTANCE=0]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“1”}}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“78d80129-b6b0-42a6-8a8d-77491efea950”}
info: ← POST /wd/hub/session/78d80129-b6b0-42a6-8a8d-77491efea950/element 200 65.656 ms - 87 {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“78d80129-b6b0-42a6-8a8d-77491efea950”}
info: → POST /wd/hub/session/78d80129-b6b0-42a6-8a8d-77491efea950/element/1/click {“id”:“1”}
info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“1”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“1”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: click
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“78d80129-b6b0-42a6-8a8d-77491efea950”}
info: ← POST /wd/hub/session/78d80129-b6b0-42a6-8a8d-77491efea950/element/1/click 200 186.314 ms - 76 {“status”:0,“value”:true,“sessionId”:“78d80129-b6b0-42a6-8a8d-77491efea950”}

Appium 1.6.3

HTTP] → POST /wd/hub/session/fe618bfd-4a70-44e0-a0be-b0f2000878af/element {“u
sing”:“name”,“value”:" MyApp"}
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: [“name”,“MyApp”,“fe618bfd-4a70-44e0-a0be-b0f2000878af”]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class
name, accessibility id, -android uiautomator
[HTTP] ← POST /wd/hub/session/fe618bfd-4a70-44e0-a0be-b0f2000878af/element 500
22 ms - 144
[HTTP] → GET /wd/hub/session/fe618bfd-4a70-44e0-a0be-b0f2000878af/screenshot {
}

please advice

Looks you have to use for locating " xpath, id, class name, accessibility id, -android uiautomator"

for example via xpath in ruby:
find_element(:xpath,"//android.widget.TextView[@text=‘Test’]")

the old way locating elements was removed I believe…try to use XPATH for locating.

Awesome its working mate thank you so much

how to check for the available commands for using latest appium

or
String name = "some_text"; ((AndroidDriver)driver).findElementByAndroidUIAutomator("new UiSelector().text(\"" + name + "\")")

  • for Android (it is should be faster then xPath)

try - https://github.com/appium/java-client/wiki to see commands

Yeah, I believe By.Name was deprecated in later versions of Appium. You’ll need to pick a different identifier, like ID or if nothing else, xpath.

instated of By.name u can use By.id , latest version of appium they removed Name.

Thank you all for the support

Hi Cepin

I was really glad that Xpath was useful, so i easy converted Byname to ByXpath

but again i have strucked up

i need to pass a set of string values to array

one by one text i need to validate whether that element is available in my device or not

Initially my code was working with Byname now as i have to use double quotes for Xpath my Array value getting converted into normal texts

so what syntax i can use

code snippet:

int count = 0;
//To verify the following elements are present in the login page
String[] myArr = {“test IDs”, “Usage without logging in”, “com.test.mobile.android.mytest:id/body_icon”, “com.test.mobile.android.mytelstra:id/auth_info_button”};

for(int i =0; i<myArr.length; i++){
try{
if(myArr[i].contains(“com.test”)){
MobileElement e = driver.findElement(By.id(myArr[i]));
System.out.println(e);
count++;
}
else{
// MobileElement e = driver.findElement(By.name(myArr[i])); //old syntax how to give the xpath
MobileElement e = driver.findElementByXPath("//android.widget.TextView[@text=’(myArr[i])’]"); //not working wont work resolution needed for this line of code
System.out.println(e);
count++;
}
}

catch (NoSuchElementException e){
	System.out.println(myArr[i] + " not found");
	Reporter.log("Screen Element" + " " + myArr[i] + " " + "not found");
	getScreenshot("Failed Screenshot/_Skip_Login_MobEle_myLogin Not Found");
}

the ouput i am getting is “test IDs not found”

Hi @Test_Market,

Could you try:
MobileElement e = driver.findElementByXPath("//android.widget.TextView[@text=’"+myArr[i]+"’]");

Magali

Thanks a lot, it worked