How to get Google's / YouTube's Autocomplete list with Selenium?

The timing and order really matters. Here’s an example:

(here should be an animated GIF which I cannot upload because it’s too big - I’ll try again later)

breakpoint

If this still does not work, try to use the suggestion with the setTimeout. First, paste the code and hit return, then interact with the page to show the popup and wait until the timeout triggers. Then it should stay open.

3 Likes