Gets the capabilities as a dictionary. The dictionary to return. A Dictionary consisting of the capabilities requested. This method is only transitional. Do not rely on it. It will be removed once browser driver capability formats stabilize. If <paramref na
(ICapabilities capabilitiesToConvert)
| 641 | /// once browser driver capability formats stabilize.</remarks> |
| 642 | /// <exception cref="ArgumentNullException">If <paramref name="capabilitiesToConvert"/> is <see langword="null"/>.</exception> |
| 643 | protected virtual Dictionary<string, object> GetCapabilitiesDictionary(ICapabilities capabilitiesToConvert) |
| 644 | { |
| 645 | ArgumentNullException.ThrowIfNull(capabilitiesToConvert); |
| 646 | |
| 647 | Dictionary<string, object> capabilitiesDictionary = new Dictionary<string, object>(); |
| 648 | |
| 649 | foreach (KeyValuePair<string, object> entry in ((IHasCapabilitiesDictionary)capabilitiesToConvert).CapabilitiesDictionary) |
| 650 | { |
| 651 | if (CapabilityType.IsSpecCompliantCapabilityName(entry.Key)) |
| 652 | { |
| 653 | capabilitiesDictionary.Add(entry.Key, entry.Value); |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | return capabilitiesDictionary; |
| 658 | } |
| 659 | |
| 660 | /// <summary> |
| 661 | /// Registers a command to be executed with this driver instance as an internally known driver command. |
no test coverage detected