New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 756231 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Material Design Settings page is missing IDs for buttons

Project Member Reported by crouleau@chromium.org, Aug 16 2017

Issue description

The new material design settings page does not have an ID for the button to click to mirror the displays. Repro steps:

(0) Chrome version 62.0.3186.0
(1) Connect ChromeOS device to an external display
(2) navigate to chrome://settings/display
(3) right click to inspect the toggle button to the right of "Mirroring". See that the "paper-toggle-button" element does not have an ID.

Without an ID for buttons, it makes it difficult to write tests. I also hear that not having them is a problem for accessibility as well.

See Google bug https://b.corp.google.com/issues/64753238 . This is breaking our tests. 
 
Cc: tbuck...@chromium.org
Labels: -Pri-2 Pri-3
Owner: dpa...@chromium.org
@dpapad did we have IDs for most buttons in the old MD Settings page?
Labels: -Pri-3 Pri-2
Yes. In the past "display-options-select-mirroring" element controlled mirroring an external display.

This is breaking our existing tests so this is a P2. Video team can't test playback performance metrics on ChromeOS without this element having an ID. 
Blocking: -478982
Owner: steve...@chromium.org
Status: Fixed (was: Assigned)
Spoke with stevenjb@. He told me that 

"Tests that want to set display settings should use an extension that uses the chrome.system.display API)
https://developer.chrome.com/apps/system_display
See chrome.system.display.setDisplayProperties"

So I'm gonna just use an extension to set this up instead of using Chromedriver. That means that the missing IDs aren't a problem for me.
Relying on specific UI, especially something as changeable as the button ids, is definitely a problem.

As a short term workaround, one could try to execute something like the following JS from the chrome://settings page, assuming chromedriver allows that:

chrome.system.display.getDisplayLayout(function(layouts) {
  if (layouts.length < 2)
    // ERROR
  chrome.system.display.setDisplayProperties({
    id: layouts[1].id,
    mirroringSourceId: layouts[0].id,
  });
});

An extension is a better approach, but we may need to whitelist it in _api_features.json (unless you can run your test in kiosk mode).

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment