tags:

views:

58

answers:

1

Hello,

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 letter you typed?

+1  A: 

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

pnewhook
Thank you, Peter! I tried and it works!
Ana
Glad to hear! You should mark this as an answer.
pnewhook