/// <summary> /// Initializes a new instance of the <see cref="WebDriverCommandProcessor"/> class. /// </summary> /// <param name="baseUrl">The base URL of the Selenium server.</param> /// <param name="baseDriver">The IWebDriver object used for executing commands.</param> public WebDriverCommandProcessor(Uri baseUrl, IWebDriver baseDriver) { this.driver = baseDriver; this.baseUrl = baseUrl; this.select = new SeleniumOptionSelector(this.elementFinder); this.timer = new CommandTimer(30000); this.alertOverride = new AlertOverride(baseDriver); }
protected override object HandleSeleneseCommand(IWebDriver driver, string locator, string value) { IWebElement element = finder.FindElement(driver, locator); if (!SeleniumOptionSelector.IsMultiSelect(element)) { throw new SeleniumException("You may only add a selection to a select that supports multiple selections"); } selector.Select(driver, locator, value, true, false); return(null); }
public CTM_Test() { InitializeComponent(); // init local variables this.testRunId = 0; this.testRunBrowserId = 0; this.testDownloadUrl = ""; this.testBrowser = null; this.haltOnError = false; this.testHadError = false; this.testVariables = new Selenium_Test_Suite_Variables(); this.seleneseMethods = new Dictionary<String, SeleneseCommand>(); this.elementFinder = new ElementFinder(); this.select = new SeleniumOptionSelector(this.elementFinder); this.keyState = new KeyState(); this.tests = new ArrayList(); this.testCommands = new ArrayList(); }
public AddSelection(ElementFinder elementFinder, SeleniumOptionSelector optionSelector) { finder = elementFinder; selector = optionSelector; }
/// <summary> /// Initializes a new instance of the <see cref="FindSelectedOptionProperties"/> class. /// </summary> /// <param name="optionSelect">A <see cref="SeleniumOptionSelector"/> that gets options from the element.</param> /// <param name="property">The property on which to select the options.</param> public FindSelectedOptionProperties(SeleniumOptionSelector optionSelect, SeleniumOptionSelector.Property property) { this.selector = optionSelect; this.property = property; }
public GetSelectOptions(SeleniumOptionSelector optionsSelector) { selector = optionsSelector; }
/// <summary> /// Initializes a new instance of the <see cref="IsSomethingSelected"/> class. /// </summary> /// <param name="optionSelector">A <see cref="SeleniumOptionSelector"/> used to get options in the select element.</param> public IsSomethingSelected(SeleniumOptionSelector optionSelector) { this.selector = optionSelector; }
public SelectOption(SeleniumOptionSelector optionSelector) { selector = optionSelector; }
/// <summary> /// Initializes a new instance of the <see cref="SelectOption"/> class. /// </summary> /// <param name="alertOverride">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param> /// <param name="optionSelector">The <see cref="SeleniumOptionSelector"/> used in selecting the option.</param> public SelectOption(AlertOverride alertOverride, SeleniumOptionSelector optionSelector) { this.selector = optionSelector; this.alertOverride = alertOverride; }
/// <summary> /// Initializes a new instance of the <see cref="WebDriverCommandProcessor"/> class. /// </summary> /// <param name="baseUrl">The base URL of the Selenium server.</param> /// <param name="baseDriver">The IWebDriver object used for executing commands.</param> public WebDriverCommandProcessor(Uri baseUrl, IWebDriver baseDriver) { this.driver = baseDriver; this.baseUrl = baseUrl; this.select = new SeleniumOptionSelector(elementFinder); }
/// <summary> /// Initializes a new instance of the <see cref="RemoveSelection"/> class. /// </summary> /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param> /// <param name="optionSelector">The <see cref="SeleniumOptionSelector"/> used to select the object.</param> public RemoveSelection(ElementFinder elementFinder, SeleniumOptionSelector optionSelector) { this.finder = elementFinder; this.selector = optionSelector; }
/// <summary> /// Initializes a new instance of the <see cref="FindFirstSelectedOptionProperty"/> class. /// </summary> /// <param name="optionSelect">A <see cref="SeleniumOptionSelector"/> that gets options from the element.</param> /// <param name="property">The property on which to select the options.</param> public FindFirstSelectedOptionProperty(SeleniumOptionSelector optionSelect, SeleniumOptionSelector.Property property) { this.selector = optionSelect; this.property = property; }