private GetElementFromResponse ( OpenQA.Selenium.Remote.Response response ) : IWebElement | ||
response | OpenQA.Selenium.Remote.Response | Reponse from the browser |
리턴 | IWebElement |
/// <summary> /// Finds a child element matching the given mechanism and value. /// </summary> /// <param name="mechanism">The mechanism by which to find the element.</param> /// <param name="value">The value to use to search for the element.</param> /// <returns>The first <see cref="IWebElement"/> matching the given criteria.</returns> protected IWebElement FindElement(string mechanism, string value) { Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("id", elementId); parameters.Add("using", mechanism); parameters.Add("value", value); Response commandResponse = Execute(DriverCommand.FindChildElement, parameters); return(driver.GetElementFromResponse(commandResponse)); }
/// <summary> /// Finds the active element on the page and returns it /// </summary> /// <returns>Element that is active</returns> public IWebElement ActiveElement() { Response response = driver.Execute(DriverCommand.GetActiveElement, null); return(driver.GetElementFromResponse(response)); }