コード例 #1
0
 public void MouseClick()
 {
     GingerWebElement.MouseClick(this.WebElement, Driver);
 }
コード例 #2
0
 public void DoubleClick()
 {
     GingerWebElement.DoubleClick(this.WebElement, Driver);
 }
コード例 #3
0
 public void MultiClick()
 {
     GingerWebElement.MultiClick(this.WebElement, Driver);
 }
コード例 #4
0
 public void ClearValue()
 {
     GingerWebElement.ClearList(WebElement);
 }
コード例 #5
0
 public void JavascriptClick()
 {
     GingerWebElement.JavascriptClick(this.WebElement, Driver);
 }
コード例 #6
0
 public void SelectByIndex(int index)
 {
     GingerWebElement.SelecElementByIndex(WebElement, index);
 }
コード例 #7
0
 public void SelectByText(string Text)
 {
     GingerWebElement.SelectElementByText(WebElement, Text);
 }
コード例 #8
0
 public void Select(string Value)
 {
     GingerWebElement.SelectElementByValue(WebElement, Value);
 }
コード例 #9
0
 public bool IsValuePopulated()
 {
     return(GingerWebElement.CheckValuePopulated(WebElement));
 }
コード例 #10
0
 public List <string> GetValidValue()
 {
     return(GingerWebElement.GetDropDownListOptions(WebElement));
 }
コード例 #11
0
 public string GetSelectedValue()
 {
     return(GingerWebElement.GetSelectedValue(WebElement));
 }
コード例 #12
0
        private IGingerWebElement wrapper(eElementType elementType, IWebElement element)
        {
            IGingerWebElement Element = null;

            switch (elementType)
            {
            case eElementType.Button:      // return the generic base element
                Element = new Button();
                break;

            case eElementType.Canvas:
                // TODO: think if we want to check TagName to verify element type
                Element = new Canvas();
                break;

            case eElementType.CheckBox:
                Element = new CheckBox();
                break;

            case eElementType.ComboBox:
                Element = new ComboBox();
                break;

            case eElementType.Div:
                Element = new GingerWebElement();
                break;

            case eElementType.Image:
                Element = new GingerWebElement();
                break;

            case eElementType.Label:
                Element = new Label();
                break;

            case eElementType.List:
                Element = new List();
                break;

            case eElementType.RadioButton:
                Element = new RadioButton();
                break;

            case eElementType.Span:
                Element = new Span();
                break;

            case eElementType.Table:
                Element = new Table();
                break;

            case eElementType.TextBox:
                Element = new TextBox();
                break;

            case eElementType.WebElement:
            case eElementType.Unknown:

                eElementType MyElemetType = GetElementType(element);
                if (MyElemetType == eElementType.Unknown)
                {
                    Element         = new GingerWebElement();
                    Element.Element = element;
                }

                else
                {
                    Element = wrapper(MyElemetType, element);
                }
                break;

            case eElementType.HyperLink:
                Element = new HyperLink();
                break;
            }

            Element.Element = element;

            if (Element is GingerWebElement GE)
            {
                GE.Driver = mDriver;
            }

            return(Element);
        }