Development

In my application, there is a drop down to select “Estimation Date”:

Please find below my test case. It is failing at the line where I am trying to select “Since”:

public class dropdown_issue {

GenericFunctions gf= new GenericFunctions();

@Test(enabled = true)

public void dropdown () throws InterruptedException{
System.setProperty(“webdriver.gecko.driver”,”D:\Selenium\BrowserDrivers\geckodriver.exe”);
WebDriver dr=new FirefoxDriver();
dr.get(“http://10.127.129.79:8080/abc”);

Thread.sleep(3000);
dr.findElement(By.id(“username”)).sendKeys(“user”);
dr.findElement(By.id(“password”)).sendKeys(“user”);
dr.findElement(By.xpath(“//button[@type=’submit’]”)).click();
WebElement est_date_dd= dr.findElement(By.xpath(“//div[@class=’clearfix’]//select[@name=’est-date’]”));
Select est_date= new Select(est_date_dd);
est_date.selectByValue(“Since”);
Thread.sleep(3000);
dr.quit();
}
}

Code isn’t able to read Properties file. It returns validation error message in response;

The method click() is undefined for the type Object

Properties obj = new Properties();
FileInputStream objfile = new FileInputStream(System.getProperty(“user.dir”)+”\application.properties”);
obj.load(objfile);

// Navigate to link Mobile Testing and Back

driver.findElement(By.xpath(obj.getProperty(“MobileTesting”))).click();
driver.navigate().back();

// Enter Data into Form

driver.findElement(By.id(obj.getProperty(“EmailTextBox”))).sendKeys(“test@gmail.com”);
driver.findElement(By.id(obj.getProperty(“SignUpButton”))).click();

I need to validate few status of the android device. Can any one let me know how to extract the information from adb dumpsys and validate the responses using Java. Your help is much appreciated.

Ex: ‘adb shell dumpsys battery’ this code when android device is connected to windows gets executed and will fetch the response. can someone help me how to extract the information from response and validate the same.