Selenium - verify the list of suggestions is displayed
What command is used to verify the list of suggestions is displayed when typing a letter in text field (example: a)? And how to verify the items in the list start with the l开发者_StackOverflow社区etter you typed?
I believe you're talking about something like Google Suggests with autocomplete. Your test would look something like this
- Load the page
- Enter the value using typeAndWait to let the Ajax call happen
- 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
精彩评论