Open Bug 1385895 Opened 2 years ago Updated 2 years ago

WebDriver:ElementSendKeys selects wrong <option> when dispatching text to <select>

Categories

(Testing :: Marionette, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: thc202, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file geckodriver.log
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170612122443

Steps to reproduce:

1. Get <select> element;
2. Send keys "OPTION4";
3. Get the selected value.

Attached the geckodriver log with above steps executed.

Following the HTML that allows to reproduce the issue:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

<select id="selectManual">
<option>OPTION1</option>
<option>OPTION2</option>
<option>OPTION3</option>
<option>OPTION4</option>
</select>

</body>
</html>


Actual results:

Selected value is OPTION2 (sometimes OPTION3).


Expected results:

Selected value is OPTION4.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Expected <option> not being selected with sendKeysToElement → Element Send Keys selects wrong <option> when dispatching text to <select>
Priority: -- → P3
Depends on: 1418995
Priority: P3 → P2
Summary: Element Send Keys selects wrong <option> when dispatching text to <select> → WebDriver:ElementSendKeys selects wrong <option> when dispatching text to <select>
You need to log in before you can comment on or make changes to this bug.