no it is not working i have tried that also
package com.finwizard.fisdom;
import org.testng.annotations.Test;
import java.net.URL;
import java.util.List;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import io.appium.java_client.MobileBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
public class LoginFisdom {
private AndroidDriver<AndroidElement>driver;
@BeforeTest
public void setUp() throws Exception {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName","ZY222XVS7H");
capabilities.setCapability("platformVersion", "6.0");
capabilities.setCapability("appPackage", "com.finwizard.fisdom");
capabilities.setCapability("appActivity", "com.finwizard.fisdom.landing.LandingPageActivity");
driver =new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
}
@Test
public void testLogin(){
driver.findElementById("com.finwizard.fisdom:id/signin").click();
driver.findElementById("com.finwizard.fisdom:id/email").sendKeys("d1663@reductlabs.com");
driver.hideKeyboard();
driver.findElementById("com.finwizard.fisdom:id/password").sendKeys("domore");
driver.hideKeyboard();
driver.findElementById("com.finwizard.fisdom:id/signin").click();
//AndroidElement text = driver.findElementByXPath("//android.widget.RelativeLayout[@resource-id='com.finwizard.fisdom:id/balanceAmt']");
//System.out.println(text.getText());
/*System.out.println("Balance: " + balance.getText());
AndroidElement earnings = driver.findElementById("com.finwizard.fisdom:id/earningsAmt");
System.out.println( "Earnings: " + earnings.getText());
*/
//List text= driver.findElementsByClassName("android.widget.TextView");
//AndroidElement element = text.get(1);
System.out.println(driver.findElement(MobileBy.id("com.finwizard.fisdom:id/balanceAmt")).getText());
}
@AfterTest
public void tearDown() throws Exception {
driver.quit();
}
}