I'm writing a functional test in PHPUnit using Selenium WebDriver.
I need to do this:
$searchBox->send_keys("bath & body");
to simulate typing into a text box.
When I run the test, I see it type bath body
instead, skipping the ampersand.
I eventually narrowed the problem down to one part of Jquery-ui Autocomplete that was interfering. The source option.
If I temporarily remove the 'source' option, the test runs fine.
All other javascript could remain in place and work fine.
Of course it doesn't make sense to remove the 'source' option; it's required.
Does anyone know what the problem is and whether there is a workaround?
P.S. This question started here: https://stackoverflow.com/a/11957421/470749