ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

select_by text no longer selects all options matching with matching text. Still working in IE, FF. #949

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
If you select some list options by Text, you'd select all matching elements in 
that <select> list. Now, Chrome quickly selects each item individually, and 
deselects the previously selected item when selecting the next time.

The net result is that if you have a multi-select list and select something 
that matches 3 options by text, only the last element in the list gets selected.

This has occurred in the last few weeks. Prior to this break, all three 
browsers operated in the same way. 

Expected behavior:
Consistent with previous behavior in chrome, and consistent with current 
behavior in IE and FF, I expect that when I select the options "Default" by 
text (see demo code below), all 3 "Default" options in each optgroup would get 
selected.

Reporter priority:
Like everyone on the planet, we use Webdriver for regression. This issue causes 
a few dozen of our regression tests to fail, and generates extra verification 
work for our SQA team, so I'd like to see a change sooner than later. Just a 
little personal plea from me. :)

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
test.rb:
==================================================================
  require 'selenium-webdriver'
  current_dir = File.expand_path File.dirname(__FILE__)
  driver = Selenium::WebDriver.for :firefox
  driver.navigate.to "file://#{current_dir}/test.html"
  Selenium::WebDriver::Support::Select.new(driver.find_element(id:"color")).select_by :text, 'Default'
==================================================================

test.html:
==================================================================
<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Single select webdriver test</title>
  <!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</head>

<body>
<label for="color">Please choose a color scheme:</label><br>
<select id="color" name="color" multiple size = 10>
<optgroup label="Green">
  <option value="green-default">Default</option>
  <option value="green-light">light</option>
  <option value="green-dark">dark</option>
</optgroup>
<optgroup label="Yellow">
  <option value="yellow-default">Default</option>
  <option value="yellow-light">light</option>
  <option value="yellow-dark">dark</option>
</optgroup>
<optgroup label="Red">
  <option value="yellow-default">Default</option>
  <option value="yellow-light">light</option>
  <option value="yellow-dark">dark</option>
</optgroup>
</select>
</body>
</html>
==================================================================

I would create proper attachments, but on the new issue logging page, I see 
"issue attachment storage quota exceeded" where I'd normally see the upload 
option.

Original issue reported on code.google.com by i...@ryancastro.com on 21 Oct 2014 at 7:12

GoogleCodeExporter commented 9 years ago
Always forget.

Seeing this issue on:
Chrome Version 40.0.2188.2 dev-m (64-bit)
Chromedriver 2.9. 

(I don't think Chromedriver is the issue, since I've been using 2.9 for months 
and months but this issue only appeared recently. But I'm reporting through 
here since I'm pretty sure the process is that you escalate 
chromedriver-affected issues to the Chrome team directly).

Original comment by i...@ryancastro.com on 21 Oct 2014 at 7:15

GoogleCodeExporter commented 9 years ago
Gah. Working in Chromedriver 2.11. didn't see that it came out 10 days ago, and 
I avoided 2.10 for some regressions it introduced.

You may close this issue.

Original comment by i...@ryancastro.com on 21 Oct 2014 at 7:24

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 2 Mar 2015 at 10:53