How to handle autocomplete options via webdriver

67 views
Skip to first unread message

Arulprasad Samiayya

unread,
Sep 4, 2014, 9:47:07 AM9/4/14
to seleniu...@googlegroups.com
Hi ,

I would like to get the collection of autocomplete suggestions and I have to click on specific item that matches my string OR I have to click on 3 rd item from that autocomplete options.

For.e.g.,

On typing 'selenium' in google, it suggests autocomplete options like <selenium> <selenium tutorial> <selenium webdriver> .... <selenium standalone> . here, i have to get all items in list and wanna check my string matches with any of these items.

Presenting code will help me better !!

Thanks in advance.

David Lai

unread,
Sep 4, 2014, 6:45:56 PM9/4/14
to seleniu...@googlegroups.com
It's annoying using an inspectory window for those sorts of things.  I'd probably recommend just record it using Selenium Builder first, then try to figure out what the DOM is doing and creating your Webdriver FindBy expressions and webdriverWait statements around that.

-DL

Arulprasad Samiayya

unread,
Sep 5, 2014, 11:15:06 AM9/5/14
to seleniu...@googlegroups.com
Thanks David. I did it using xpath. I would like to get those list of autocomplete suggestions that poping up whenever am searching with different search input. Could u help me out ?
Reply all
Reply to author
Forward
0 new messages