Created attachment 442270 [details] Python script to reproduce the problem. "Clicking" option element via WebDriver the second time doesn't fire change event, even though the selection has been changed via JavaScript. Steps to Reproduce (see the attached script): 1. Create a <select> with two <option> 2. Listen to the change event of the <select> 3. Select ("click") the second <option> via WebDriver 4. Select the first <option> via JavaScript 5. Select ("click") the second <option> via WebDriver Expected Results: A change event is fired at step 5 Actual Results: No change event is fired at step 5 My environment: * Arch Linux * webkit2gtk 2.32.4-1 * python 3.9.7-1 * python-selenium 3.141.0-3 My educated guess is that WebKit::WebAutomationSessionProxy::selectOptionElement should call WebCore::HTMLSelectElement::saveLastSelection before calling WebCore::HTMLSelectElement::optionSelectedByUser.
<rdar://problem/84841212>