Selenium - verify the list of suggestions is displayed

时光毁灭记忆、已成空白 提交于 2019-12-06 00:30:53

I believe you're talking about something like Google Suggests with autocomplete. Your test would look something like this

  1. Load the page
  2. Enter the value using typeAndWait to let the Ajax call happen
  3. Compare the result to a text blob

The calls would be like this

open(/)
typeAndWait(textId,a)
verifyText(css=div#suggestion:first-child,a*)

Hope that helps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!