Bug 232202

Summary: "Clicking" option element via WebDriver the second time doesn't fire change event
Product: WebKit Reporter: Pochang Chen <johnchen902>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bburg, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Python script to reproduce the problem. none

Pochang Chen
Reported 2021-10-23 11:34:15 PDT
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.
Attachments
Python script to reproduce the problem. (1.01 KB, text/plain)
2021-10-23 11:34 PDT, Pochang Chen
no flags
Radar WebKit Bug Importer
Comment 1 2021-10-30 11:35:15 PDT
Note You need to log in before you can comment on or make changes to this bug.