コード例 #1
0
ファイル: Type.cs プロジェクト: Rameshnathan/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="Type"/> class.
 /// </summary>
 /// <param name="alertOverride">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="keyState">A <see cref="KeyState"/> object tracking the state of modifier keys.</param>
 public Type(AlertOverride alertOverride, ElementFinder elementFinder, KeyState keyState)
 {
     this.alertOverride = alertOverride;
     this.finder = elementFinder;
     this.state = keyState;
     this.type = "return (" + JavaScriptLibrary.GetSeleniumScript("type.js") + ").apply(null, arguments);";
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SeleniumSelect"/> class.
        /// </summary>
        /// <param name="finder">An <see cref="ElementFinder"/> used in finding options.</param>
        /// <param name="driver">An <see cref="IWebDriver"/> used to drive the browser.</param>
        /// <param name="locator">A locator used to find options.</param>
        public SeleniumSelect(ElementFinder finder, IWebDriver driver, string locator)
        {
            this.driver = driver;

            this.findOption = "return (" + JavaScriptLibrary.GetSeleniumScript("findOption.js") + ").apply(null, arguments)";

            this.select = finder.FindElement(driver, locator);
            if (this.select.TagName.ToLowerInvariant() != "select")
            {
                throw new SeleniumException("Element is not a select element: " + locator);
            }
        }
コード例 #3
0
ファイル: CTM_Test.cs プロジェクト: zerodiv/CTM-Windows-Agent
        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();
        }
コード例 #4
0
ファイル: Click.cs プロジェクト: anthrax3/selenium-3
 /// <summary>
 /// Initializes a new instance of the <see cref="Click"/> class.
 /// </summary>
 /// <param name="alert">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Click(AlertOverride alert, ElementFinder finder)
 {
     this.finder = finder;
     this.alert  = alert;
 }
コード例 #5
0
ファイル: AddSelection.cs プロジェクト: anthrax3/selenium-2
 public AddSelection(ElementFinder elementFinder, SeleniumOptionSelector optionSelector)
 {
     finder   = elementFinder;
     selector = optionSelector;
 }
コード例 #6
0
ファイル: Submit.cs プロジェクト: banksdada/SeleniumHQ
 /// <summary>
 /// Initializes a new instance of the <see cref="Submit"/> class.
 /// </summary>
 /// <param name="alert">An <see cref="AlertOverride"/> object used to override alerts displayed in an onSubmit event handler.</param>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Submit(AlertOverride alert, ElementFinder finder)
 {
     this.alert  = alert;
     this.finder = finder;
 }
コード例 #7
0
 public GetElementPositionTop(ElementFinder elementFinder)
 {
     finder = elementFinder;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetSelectOptions"/> class.
 /// </summary>
 /// <param name="finder">A <see cref="ElementFinder"/> used in getting the select options.</param>
 public GetSelectOptions(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveAllSelections"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public RemoveAllSelections(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #10
0
ファイル: Click.cs プロジェクト: hugs/selenium
 public Click(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #11
0
ファイル: SelectOption.cs プロジェクト: kaushik9k/Selenium2
 /// <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="finder">The <see cref="ElementFinder"/> used in selecting the option.</param>
 public SelectOption(AlertOverride alertOverride, ElementFinder finder)
 {
     this.finder = finder;
     this.alertOverride = alertOverride;
 }
コード例 #12
0
ファイル: FireEvent.cs プロジェクト: gwestersf/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="FireEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public FireEvent(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
     this.fire   = "return (" + JavaScriptLibrary.GetSeleniumScript("fireEvent.js") + ").apply(null, arguments);";
 }
コード例 #13
0
ファイル: Submit.cs プロジェクト: brucezhang80/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="Submit"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Submit(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetAttribute"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetAttribute(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #15
0
 /// <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>
 public RemoveSelection(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetElementPositionLeft"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetElementPositionLeft(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DoubleClick"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public DoubleClick(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #18
0
ファイル: IsEditable.cs プロジェクト: kaushik9k/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="IsEditable"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public IsEditable(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="state">A <see cref="KeyState"/> object defining the state of modifier keys.</param>
 /// <param name="eventName">The name of the event to send.</param>
 public KeyEvent(ElementFinder elementFinder, KeyState state, string eventName)
 {
     this.finder    = elementFinder;
     this.keyState  = state;
     this.eventName = eventName;
 }
コード例 #20
0
ファイル: IsElementPresent.cs プロジェクト: hugs/selenium
 public IsElementPresent(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #21
0
 public IsVisible(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #22
0
ファイル: GetElementIndex.cs プロジェクト: hugs/selenium
 public GetElementIndex(ElementFinder elementFinder)
 {
     finder = elementFinder;
 }
コード例 #23
0
ファイル: Highlight.cs プロジェクト: KirillJacobson/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="Highlight"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Highlight(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #24
0
ファイル: Type.cs プロジェクト: KirillJacobson/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="Type"/> class.
 /// </summary>
 /// <param name="alertOverride">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="keyState">A <see cref="KeyState"/> object tracking the state of modifier keys.</param>
 public Type(AlertOverride alertOverride, ElementFinder elementFinder, KeyState keyState)
 {
     this.alertOverride = alertOverride;
     this.finder        = elementFinder;
     this.state         = keyState;
 }
コード例 #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddLocationStrategy"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> object used to locate elements.</param>
 public AddLocationStrategy(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #26
0
ファイル: TypeKeys.cs プロジェクト: banksdada/SeleniumHQ
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeKeys"/> class.
 /// </summary>
 /// <param name="alertOverride">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public TypeKeys(AlertOverride alertOverride, ElementFinder elementFinder)
 {
     this.alertOverride = alertOverride;
     this.finder        = elementFinder;
 }
コード例 #27
0
ファイル: AddSelection.cs プロジェクト: hugs/selenium
 public AddSelection(ElementFinder elementFinder, SeleniumOptionSelector optionSelector)
 {
     finder = elementFinder;
     selector = optionSelector;
 }
コード例 #28
0
ファイル: Highlight.cs プロジェクト: kaushik9k/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="Highlight"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Highlight(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #29
0
ファイル: IsOrdered.cs プロジェクト: RanchoLi/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="IsOrdered"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public IsOrdered(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DragAndDropToObject"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public DragAndDropToObject(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #31
0
ファイル: AssignId.cs プロジェクト: Rameshnathan/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="AssignId"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used in finding the element to which to assign the ID.</param>
 public AssignId(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #32
0
ファイル: KeyEvent.cs プロジェクト: kaushik9k/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="state">A <see cref="KeyState"/> object defining the state of modifier keys.</param>
 /// <param name="eventName">The name of the event to send.</param>
 public KeyEvent(ElementFinder elementFinder, KeyState state, string eventName)
 {
     this.finder = elementFinder;
     this.keyState = state;
     this.eventName = eventName;
 }
コード例 #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsVisible"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public IsVisible(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #34
0
ファイル: AttachFile.cs プロジェクト: simudream/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="AttachFile"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used in finding the element.</param>
 public AttachFile(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #35
0
 public GetElementPositionLeft(ElementFinder elementFinder)
 {
     finder = elementFinder;
 }
コード例 #36
0
 public AssignId(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #37
0
ファイル: Uncheck.cs プロジェクト: vaxouris/selenium_edge
 /// <summary>
 /// Initializes a new instance of the <see cref="Uncheck"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Uncheck(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetElementWidth"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetElementWidth(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FindFirstSelectedOptionProperty"/> class.
 /// </summary>
 /// <param name="finder">A <see cref="ElementFinder"/> that gets options from the element.</param>
 /// <param name="property">The property on which to select the options.</param>
 public FindFirstSelectedOptionProperty(ElementFinder finder, string property)
 {
     this.finder   = finder;
     this.property = property;
 }
コード例 #40
0
ファイル: TypeKeys.cs プロジェクト: kaushik9k/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeKeys"/> class.
 /// </summary>
 /// <param name="alertOverride">An <see cref="AlertOverride"/> object used to handle JavaScript alerts.</param>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public TypeKeys(AlertOverride alertOverride, ElementFinder elementFinder)
 {
     this.alertOverride = alertOverride;
     this.finder = elementFinder;
 }
コード例 #41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddSelection"/> class.
 /// </summary>
 /// <param name="elementFinder">The <see cref="ElementFinder"/> to use in finding elements.</param>
 public AddSelection(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #42
0
ファイル: Submit.cs プロジェクト: JoeHe/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="Submit"/> class.
 /// </summary>
 /// <param name="alert">An <see cref="AlertOverride"/> object used to override alerts displayed in an onSubmit event handler.</param>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public Submit(AlertOverride alert, ElementFinder finder)
 {
     this.alert = alert;
     this.finder = finder;
 }
コード例 #43
0
ファイル: GetValue.cs プロジェクト: JoeHe/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="GetValue"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetValue(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #44
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FindSelectedOptionProperties"/> class.
 /// </summary>
 /// <param name="finder">A <see cref="ElementFinder"/> that gets options from the element.</param>
 /// <param name="property">The property on which to select the options.</param>
 public FindSelectedOptionProperties(ElementFinder finder, string property)
 {
     this.finder = finder;
     this.property = property;
 }
コード例 #45
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddLocationStrategy"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> object used to locate elements.</param>
 public AddLocationStrategy(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #46
0
ファイル: GetElementWidth.cs プロジェクト: hugs/selenium
 public GetElementWidth(ElementFinder elementFinder)
 {
     finder = elementFinder;
 }
コード例 #47
0
ファイル: FireNamedEvent.cs プロジェクト: RanchoLi/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="FireNamedEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="eventName">The name of the event to fire.</param>
 public FireNamedEvent(ElementFinder elementFinder, string eventName)
 {
     this.finder = elementFinder;
     this.name = eventName;
     this.fire = "return (" + JavaScriptLibrary.GetSeleniumScript("fireEvent.js") + ").apply(null, arguments);";
 }
コード例 #48
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MouseEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="eventType">Type of event to trigger.</param>
 public MouseEvent(ElementFinder elementFinder, string eventType)
 {
     this.finder = elementFinder;
     this.type   = eventType;
 }
コード例 #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MouseEventAt"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="eventType">The type of event to trigger.</param>
 public MouseEventAt(ElementFinder elementFinder, string eventType)
 {
     this.finder = elementFinder;
     this.type   = eventType;
     this.fire   = "return (" + JavaScriptLibrary.GetSeleniumScript("fireEventAt.js") + ").apply(null, arguments);";
 }
コード例 #50
0
ファイル: GetTable.cs プロジェクト: zerodiv/CTM-Windows-Agent
 public GetTable(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #51
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetElementHeight"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetElementHeight(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #52
0
ファイル: GetValue.cs プロジェクト: KirillJacobson/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="GetValue"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetValue(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #53
0
ファイル: AttachFile.cs プロジェクト: Rameshnathan/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="AttachFile"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used in finding the element.</param>
 public AttachFile(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #54
0
 public MouseEventAt(ElementFinder elementFinder, string eventType)
 {
     finder = elementFinder;
     type = eventType;
 }
コード例 #55
0
 /// <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="finder">The <see cref="ElementFinder"/> used in selecting the option.</param>
 public SelectOption(AlertOverride alertOverride, ElementFinder finder)
 {
     this.finder        = finder;
     this.alertOverride = alertOverride;
 }
コード例 #56
0
ファイル: GetText.cs プロジェクト: draculavlad/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="GetText"/> class.
 /// </summary>
 /// <param name="finder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public GetText(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #57
0
ファイル: Uncheck.cs プロジェクト: hugs/selenium
 public Uncheck(ElementFinder finder)
 {
     this.finder = finder;
 }
コード例 #58
0
ファイル: DragAndDrop.cs プロジェクト: simudream/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="DragAndDrop"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public DragAndDrop(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #59
0
ファイル: DragAndDrop.cs プロジェクト: Rameshnathan/selenium
 /// <summary>
 /// Initializes a new instance of the <see cref="DragAndDrop"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 public DragAndDrop(ElementFinder elementFinder)
 {
     this.finder = elementFinder;
 }
コード例 #60
0
ファイル: MouseEvent.cs プロジェクト: kaushik9k/Selenium2
 /// <summary>
 /// Initializes a new instance of the <see cref="MouseEvent"/> class.
 /// </summary>
 /// <param name="elementFinder">An <see cref="ElementFinder"/> used to find the element on which to execute the command.</param>
 /// <param name="eventType">Type of event to trigger.</param>
 public MouseEvent(ElementFinder elementFinder, string eventType)
 {
     this.finder = elementFinder;
     this.type = eventType;
     this.fire = "return (" + JavaScriptLibrary.GetSeleniumScript("fireEvent.js") + ").apply(null, arguments);";
 }