Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can selenium handle autocomplete?

I have a test case that requires typing in a partial value into an ajax based textfield and verifying the list has the expected content. If it does, select the content. Any idea how to make this work?

like image 372
Afamee Avatar asked Mar 19 '09 16:03

Afamee


People also ask

How do I automate a calendar in selenium?

Step 1 - Initiate WebDriver and set the application's URL where a Calendar is implemented. Define the xpath with the Calendar control's id (in this example it is - travel_date) from the html source to find the element and later use that object to initiate the click action.


1 Answers

The type command may not be enough to trigger the autocomplete. Dave Webb's suggestions are otherwise spot on. My only addition would be that you might need the typeKeys command, which causes slightly different JavaScript events to be fired, which may be more likely to trigger the autocomplete widget.

like image 151
Patrick Lightbody Avatar answered Oct 22 '22 19:10

Patrick Lightbody