Created
June 19, 2016 13:33
-
-
Save angelovstanton/b3203f690e36e10c3583900b810ee3ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class By | |
{ | |
public By(SearchType type, string value) : | |
this(type, value, null) | |
{ | |
} | |
public SearchType Type { get; private set; } | |
public string Value { get; private set; } | |
public static By Id(string id) | |
{ | |
return new By(SearchType.Id, id); | |
} | |
public static By InnerTextContains(string innerText) | |
{ | |
return new By(SearchType.InnerTextContains, innerText); | |
} | |
public static By Xpath(string xpath) | |
{ | |
return new By(SearchType.XPath, xpath); | |
} | |
public static By Id(string id, IElement parentElement) | |
{ | |
return new By(SearchType.Id, id, parentElement); | |
} | |
public static By CssClass(string cssClass) | |
{ | |
return new By(SearchType.CssClass, cssClass); | |
} | |
public static By Name(string name) | |
{ | |
return new By(SearchType.Name, name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment