如何处理应用程序中的自动建议字段:紧急



我想处理自动建议文本字段,在该字段中键入几个字母将自动列出我要单击的选项并选择该选项。 但是我在从列表中选择选项时遇到了问题

任何处理此问题的方法...请帮助一些建议,我坚持在这个.....在此处输入图像描述

After entering few characters wait until the screen which appears with suggestion using any xpath.

//Assume suggestionlist is your id 
driver.findelementbyid("suggestionlist")
One done take all elements in list.
@findby (id="suggestionlist")
List <AndroidElement> list;
once you get the list please manipulate that . 
foreach(element in list)
{
  if(element.gettext().equals("your desired value"))
  element.click();
}

最新更新