Exemple #1
0
 public void MouseClick()
 {
     GingerWebElement.MouseClick(this.WebElement, Driver);
 }
Exemple #2
0
 public void DoubleClick()
 {
     GingerWebElement.DoubleClick(this.WebElement, Driver);
 }
Exemple #3
0
 public void MultiClick()
 {
     GingerWebElement.MultiClick(this.WebElement, Driver);
 }
 public void ClearValue()
 {
     GingerWebElement.ClearList(WebElement);
 }
Exemple #5
0
 public void JavascriptClick()
 {
     GingerWebElement.JavascriptClick(this.WebElement, Driver);
 }
 public void SelectByIndex(int index)
 {
     GingerWebElement.SelecElementByIndex(WebElement, index);
 }
 public void SelectByText(string Text)
 {
     GingerWebElement.SelectElementByText(WebElement, Text);
 }
 public void Select(string Value)
 {
     GingerWebElement.SelectElementByValue(WebElement, Value);
 }
 public bool IsValuePopulated()
 {
     return(GingerWebElement.CheckValuePopulated(WebElement));
 }
 public List <string> GetValidValue()
 {
     return(GingerWebElement.GetDropDownListOptions(WebElement));
 }
 public string GetSelectedValue()
 {
     return(GingerWebElement.GetSelectedValue(WebElement));
 }
Exemple #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);
        }