Finds the elements that are in the response Response from the browser Collection of elements
(Response response)
| 535 | /// <param name="response">Response from the browser</param> |
| 536 | /// <returns>Collection of elements</returns> |
| 537 | internal ReadOnlyCollection<IWebElement> GetElementsFromResponse(Response response) |
| 538 | { |
| 539 | List<IWebElement> toReturn = new List<IWebElement>(); |
| 540 | if (response.Value is object?[] elements) |
| 541 | { |
| 542 | foreach (object? elementObject in elements) |
| 543 | { |
| 544 | if (elementObject is Dictionary<string, object?> elementDictionary) |
| 545 | { |
| 546 | WebElement element = this.elementFactory.CreateElement(elementDictionary); |
| 547 | toReturn.Add(element); |
| 548 | } |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | return toReturn.AsReadOnly(); |
| 553 | } |
| 554 | |
| 555 | /// <summary> |
| 556 | /// Executes a command with this driver. |
no test coverage detected