Esempio n. 1
0
 public WebBaseElement(By byLocator)
 {
     Avatar = new GetElementModule(this)
     {
         ByLocator = !byLocator.GetByLocator().Equals("EMPTY")
             ? byLocator
             : null
     };
 }
Esempio n. 2
0
 public T Get <T>(T element, GetElementModule avatar) where T : WebBaseElement
 {
     try
     {
         return(_locator == null
             ? null
             : (T)element.SetAvatar(avatar, _locator));
     }
     catch { return(null); }
 }
Esempio n. 3
0
 public WebBaseElement(By byLocator = null, IWebElement webElement = null,
                       List <IWebElement> webElements = null)
 {
     Invoker         = new ActionInvoker(this);
     GetElementClass = new GetElementClass(this);
     Actions         = new ElementsActions(this);
     WebAvatar       = new GetElementModule(this, byLocator)
     {
         WebElement = webElement, WebElements = webElements
     };
 }
Esempio n. 4
0
 public WebBaseElement(By byLocator = null, IWebElement webElement = null)
 {
     Invoker         = new ActionInvoker(this);
     GetElementClass = new GetElementClass(this);
     Actions         = new ElementsActions(this);
     _webElement     = webElement;
     Avatar          = new GetElementModule
     {
         Element   = this,
         ByLocator = byLocator
     };
 }
Esempio n. 5
0
 public WebBaseElement SetAvatar(GetElementModule avatar, By byLocator = null)
 {
     Avatar = byLocator != null
         ? new GetElementModule(this, avatar.Context)
     {
         ByLocator = byLocator,
         LocalElementSearchCriteria = avatar.LocalElementSearchCriteria,
         DriverName = avatar.DriverName
     }
         : avatar;
     return(this);
 }
Esempio n. 6
0
        protected IWebElement GetWebElement(string name)
        {
            if (!HasLocator && AllLabels == null)
            {
                throw Exception("Can't get option. No optionsNamesLocator and allLabelsLocator found");
            }
            IList <IWebElement> els = null;

            if (Locator.ToString().Contains("%s"))
            {
                els = new GetElementModule {
                    ByLocator = Locator.FillByTemplate(name),
                    Element   = this
                }
            }
Esempio n. 7
0
 public WebBaseElement(By byLocator = null, IWebElement webElement = null,
                       List <IWebElement> webElements = null, WebBaseElement element = null)
 {
     Invoker         = new ActionInvoker(this);
     GetElementClass = new GetElementClass(this);
     Actions         = new ElementsActions(this);
     WebAvatar       = new GetElementModule(this, byLocator)
     {
         WebElement = webElement, WebElements = webElements
     };
     if (element != null)
     {
         WebAvatar.DriverName = element.WebAvatar.DriverName;
         Parent = element.Parent;
     }
 }
Esempio n. 8
0
 public GetElementType(By locator, WebBaseElement element)
 {
     _locator = locator;
     _avatar  = element.WebAvatar;
 }
Esempio n. 9
0
 public WebBaseElement SetAvatar(GetElementModule avatar = null, By byLocator = null)
 {
     WebAvatar = (avatar ?? WebAvatar).Copy(byLocator);
     return(this);
 }
Esempio n. 10
0
 public BaseElement setAvatar(GetElementModule avatar)
 {
     this.avatar = avatar;
     return(this);
 }
Esempio n. 11
0
 public BaseElement setAvatar(By byLocator, GetElementModule avatar)
 {
     throw new NotImplementedException();//TODO setAvatar(By byLocator, GetElementModule avatar)
 }