Hi Andriy,
To get values of attributes (e.g. "volume"), the existing GET /session/:sessionId/element/:id/attribute/:name endpoint will do.
There is no POST for /session/:sessionId/element/:id/attribute/:name and there's no WebElement.setAttrbute() method in the bindings. SetAttribute makes sense to me at the first glance but I suspect there was a discussion about it in the past... Was there a discussion/decision about WebElement.setAttribute()?
Next, HTML spec defines these methods/verbs on the media elements: load(), canPlayType(), fastSeek(), getStartDate(), play(), pause(), addTextTrack(). Should we propagate all of them to WebDriver API? None of them? Ones most useful for web testing? Whatever we decide to propagate, I'd be for keeping spelling, e.g. use "fastSeek", not "seek".
If we decide to propagate some of the media elements' verbs to WebDriver wire protocol, we'd need to find a place to put them in the client bindings:
1. Add the methods (e.g. load(), start(), pause()) directly to WebElement interface/API and throw error every time anyone calls them on a non-media element?..
2. Proactively determine type of every element at runtime and add these methods (or +augment an interface - depending on the language) to every WebElement which is a media element?
3. Introduce some Media interface with those methods and make user call element.media().pause() and again fail that if it's not a media element?
I am not sure I like any of these options. Do you have a suggestion here, Andriy? Anyone else?
Of course, if any new wire protocol endpoints will be added, we will need a capability (because not all browsers will support media elements and not all drivers will provide the API), though that is relatively straightforward.
--
Seva