public bool Exists(Attribute findBy)
        {
            foreach (Frame frame in elements)
              {
            if (findBy.Compare(frame))
            {
              // Return
              return true;
            }
              }

              return false;
        }
 public SelectList SelectList(Attribute findBy)
 {
     return ElementsSupport.SelectList(DomContainer, findBy, this);
 }
 public RadioButton RadioButton(Attribute findBy)
 {
     return ElementsSupport.RadioButton(DomContainer, findBy, this);
 }
 public Element Element(Attribute findBy)
 {
     return ElementsSupport.Element(DomContainer, findBy, this);
 }
示例#5
0
 public ReEntryException(ItiN.Attribute attribute)
     : base(createMessage(attribute))
 {
 }
        public bool Exists(Attribute findBy)
        {
            ElementAttributeBag attributeBag = new ElementAttributeBag();

            foreach (IHTMLElement element in Elements)
            {
                attributeBag.IHTMLElement = element;
                if (findBy.Compare(attributeBag))
                {
                    return true;
                }
            }

            return false;
        }
 public SelectListCollection Filter(Attribute findBy)
 {
     return new SelectListCollection(domContainer, DoFilter(findBy));
 }
示例#8
0
        private static Frame findFrame(FrameCollection frames, Attribute findBy)
        {
            foreach (Frame frame in frames)
              {
            if (findBy.Compare(frame))
            {
              // Return
              return frame;
            }
              }

              throw new FrameNotFoundException(findBy.AttributeName, findBy.Value);
        }
 public CheckBoxCollection Filter(Attribute findBy)
 {
     return new CheckBoxCollection(domContainer, DoFilter(findBy));
 }
 public ElementCollection Filter(Attribute findBy)
 {
     return new ElementCollection(domContainer, DoFilter(findBy));
 }
示例#11
0
 /// <summary>
 /// Filters this collection with the specified find by.
 /// </summary>
 /// <param name="findBy">The <see cref="Attribute"/> to filter this collection.</param>
 /// <returns>A filtered <see cref="OptionCollection"/></returns>
 public OptionCollection Filter(Attribute findBy)
 {
     return(new OptionCollection(domContainer, DoFilter(findBy)));
 }
 public TextFieldCollection Filter(Attribute findBy)
 {
     return new TextFieldCollection(domContainer, DoFilter(findBy));
 }
示例#13
0
 private static string createMessage(ItiN.Attribute attribute)
 {
     return(string.Format("The compare methode of an Attribute class can't be reentered during execution of the compare. The exception occurred in an instance of '{0}' searching for '{1}' in attribute '{2}'.", attribute.GetType().ToString(), attribute.Value, attribute.AttributeName));
 }
 public Span Span(Attribute findBy)
 {
     return ElementsSupport.Span(DomContainer, findBy, this);
 }
示例#15
0
 public DivCollection Filter(Attribute findBy)
 {
     return new DivCollection(domContainer, DoFilter(findBy));
 }
 public TextField TextField(Attribute findBy)
 {
     return ElementsSupport.TextField(DomContainer, findBy, this);
 }
 public Button Button(Attribute findBy)
 {
     return new Button(DomContainer, ElementFinder.ButtonFinder(findBy, this));
 }
示例#18
0
 /// <summary>
 /// This constructor will mainly be used by Document.Frame to find
 /// a Frame. A FrameNotFoundException will be thrown if the Frame isn't found.
 /// </summary>
 /// <param name="frames">Collection of frames to find the frame in</param>
 /// <param name="findBy">The <see cref="Attribute"/> of the Frame to find (Find.ByUrl, Find.ByName and Find.ById are supported)</param>
 public static Frame Find(FrameCollection frames, Attribute findBy)
 {
     return findFrame(frames, findBy);
 }
 public CheckBox CheckBox(Attribute findBy)
 {
     return ElementsSupport.CheckBox(DomContainer, findBy, this);
 }
 public RadioButtonCollection Filter(Attribute findBy)
 {
     return new RadioButtonCollection(domContainer, DoFilter(findBy));
 }
 public Div Div(Attribute findBy)
 {
     return ElementsSupport.Div(DomContainer, findBy, this);
 }
        protected ArrayList DoFilter(Attribute findBy)
        {
            ArrayList returnElements;

            if (elements == null)
            {
                if (finder != null)
                {
                    returnElements = finder.FindAll(findBy);
                }
                else
                {
                    returnElements = new ArrayList();
                }
            }
            else
            {
                returnElements = new ArrayList();
                ElementAttributeBag attributeBag = new ElementAttributeBag();

                foreach (IHTMLElement element in Elements)
                {
                    attributeBag.IHTMLElement = element;

                    if (findBy.Compare(attributeBag))
                    {
                        returnElements.Add(element);
                    }
                }
            }

            return returnElements;
        }
示例#23
0
 /// <summary>
 /// Waits until the given <paramref name="attribute" /> matches.
 /// Wait will time out after <see cref="Settings.WaitUntilExistsTimeOut"/> seconds.
 /// </summary>
 /// <param name="attribute">The attribute.</param>
 public void WaitUntil(Attribute attribute)
 {
     WaitUntil(attribute, InfopathTester.Settings.WaitUntilExistsTimeOut);
 }