Exemple #1
0
 private static BaseConstraint GetConstraint(BaseConstraint constraint)
 {
     if (constraint == null)
     {
         return new AlwaysTrueConstraint();
     }
     return constraint;
 }
Exemple #2
0
		public static Element Element(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
#if NET11
			return new ElementsContainer(domContainer, domContainer.NativeBrowser.CreateElementFinder(null, findBy, elements));
#else
            return new ElementsContainer<Element>(domContainer, domContainer.NativeBrowser.CreateElementFinder(null, findBy, elements));
#endif
        }
Exemple #3
0
		public NotConstraint(BaseConstraint baseConstraint) 
		{
			if (baseConstraint == null)
			{
				throw new ArgumentNullException("baseConstraint");
			}

			_baseConstraint = baseConstraint;
		}
Exemple #4
0
	    private void CheckAndInitPrivateFields(IElementCollection elementCollection, DomContainer domContainer, BaseConstraint constraint)
	    {
	        if (elementCollection == null) throw new ArgumentNullException("elementCollection");
	        if (domContainer == null) throw new ArgumentNullException("domContainer");

            _constraint = GetConstraint(constraint);
	        _elementCollection = elementCollection;
	        _domContainer = domContainer;
	    }
Exemple #5
0
		public static Element Element(DomContainer domContainer, string tagname, BaseConstraint findBy, IElementCollection elements, params string[] inputtypes)
		{
			string inputtypesString = UtilityClass.StringArrayToString(inputtypes, ",");

#if NET11
			return new ElementsContainer(domContainer, domContainer.NativeBrowser.CreateElementFinder(tagname, inputtypesString, findBy, elements));
#else
            return new ElementsContainer<Element>(domContainer, domContainer.NativeBrowser.CreateElementFinder(tagname, inputtypesString, findBy, elements));
#endif
		}
Exemple #6
0
	    public IEElementFinder(ArrayList elementTags, BaseConstraint constraint, IElementCollection elementCollection, DomContainer domContainer)
	    {
            CheckAndInitPrivateFields(elementCollection, domContainer, constraint);

	        if (elementTags != null)
			{
				tagsToFind = elementTags;
			}
			else
			{
				AddElementTag(null, null);
			}
	    }
Exemple #7
0
		public bool Exists(BaseConstraint findBy)
		{
			foreach (Frame frame in elements)
			{
				if (findBy.Compare(frame))
				{
					// Return
					return true;
				}
			}

			return false;
		}
Exemple #8
0
		private static Frame findFrame(FrameCollection frames, BaseConstraint findBy)
		{
			foreach (Frame frame in frames)
			{
				if (findBy.Compare(frame))
				{
					// Return
					return frame;
				}
			}

			throw new FrameNotFoundException(findBy.ConstraintToString());
		}
Exemple #9
0
		public Link Link(BaseConstraint findBy)
		{
			return ElementsSupport.Link(DomContainer, findBy, this);
		}
Exemple #10
0
		public Form Form(BaseConstraint findBy)
		{
			return ElementsSupport.Form(DomContainer, findBy, this);
		}
Exemple #11
0
		public Label Label(BaseConstraint findBy)
		{
			return ElementsSupport.Label(DomContainer, findBy, this);
		}
Exemple #12
0
	    public Element Element(string tagname, BaseConstraint findBy, params string[] inputtypes)
		{
			return ElementsSupport.Element(DomContainer, tagname, findBy, this, inputtypes);
		}
Exemple #13
0
		public FileUpload FileUpload(BaseConstraint findBy)
		{
			return ElementsSupport.FileUpload(DomContainer, findBy, this);
		}
Exemple #14
0
		public static TextField TextField(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
			return new TextField(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TextField.ElementTags, findBy, elements));
		}
Exemple #15
0
		public Element Element(BaseConstraint findBy)
		{
			return ElementsSupport.Element(DomContainer, findBy, this);
        }
Exemple #16
0
		public TextField TextField(BaseConstraint findBy)
		{
			return ElementsSupport.TextField(DomContainer, findBy, this);
		}
Exemple #17
0
		public Div Div(BaseConstraint findBy)
		{
			return ElementsSupport.Div(DomContainer, findBy, this);
		}
Exemple #18
0
		public SelectList SelectList(BaseConstraint findBy)
		{
			return ElementsSupport.SelectList(DomContainer, findBy, this);
		}
Exemple #19
0
		public Para Para(BaseConstraint findBy)
		{
			return ElementsSupport.Para(DomContainer, findBy, this);
		}
Exemple #20
0
		public static Image Image(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
			return new Image(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Image.ElementTags, findBy, elements));
		}
Exemple #21
0
		public static CheckBox CheckBox(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
			return new CheckBox(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.CheckBox.ElementTags, findBy, elements));
		}
Exemple #22
0
		public static Button Button(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
			return new Button(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.Button.ElementTags, findBy, elements));
		}
Exemple #23
0
		public RadioButton RadioButton(BaseConstraint findBy)
		{
			return ElementsSupport.RadioButton(DomContainer, findBy, this);
		}
Exemple #24
0
		public static FileUpload FileUpload(DomContainer domContainer, BaseConstraint findBy, IElementCollection elements)
		{
			return new FileUpload(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.FileUpload.ElementTags, findBy, elements));
		}
Exemple #25
0
		public TableRow TableRow(BaseConstraint findBy)
		{
			return ElementsSupport.TableRow(DomContainer, findBy, this);
		}
Exemple #26
0
		/// <summary>
		/// Gets the specified frame by its name.
		/// </summary>
		/// <param name="findBy">The name of the frame.</param>
		/// <exception cref="FrameNotFoundException">Thrown if the given name isn't found.</exception>
		public Frame Frame(BaseConstraint findBy)
		{
			return Core.Frame.Find(Frames, findBy);
		}
Exemple #27
0
		public Span Span(BaseConstraint findBy)
		{
			return ElementsSupport.Span(DomContainer, findBy, this);
		}
Exemple #28
0
		public Area Area(BaseConstraint findBy)
		{
			return ElementsSupport.Area(DomContainer, findBy, this);
		}
Exemple #29
0
		public Image Image(BaseConstraint findBy)
		{
			return ElementsSupport.Image(DomContainer, findBy, this);
		}
Exemple #30
0
		public CheckBox CheckBox(BaseConstraint findBy)
		{
			return ElementsSupport.CheckBox(DomContainer, findBy, this);
		}