Hello
I was able to reproduce the issue using your example. We need some to research it. Now you can follow this workaround to set the Select Element's values programmatically:
import { Selector, ClientFunction } from 'testcafe';
fixture `Test`
.page `http://jsfiddle.net/billneff79/tbv9r99b/`;
const selectOption = ClientFunction(text => {
var el = selectEl();
var findOptionIndexByText = function (t) {
for(var i = 0; i < el.options.length; i++) {
if(el.options[i].text === t)
return i;
}
return -1;
}
el.selectedIndex = findOptionIndexByText(text);
});
test('Dropdown menu selection test', async t => {
const select = Selector('.dialog select');
await t
.switchToIframe(Selector('iframe').withAttribute('name','result'));
await selectOption.with({ dependencies: { selectEl: select } })('foo');
await t.wait(2000);
await selectOption.with({ dependencies: { selectEl: select } })('bar');
await t.wait(2000);
});