public static IPageMemberCodeEntry ConvertToCodeEntry(this HtmlNode node) { var codeEntry = new PageMemberCodeEntry(); codeEntry.SourceMemberType.Set(new List <HtmlElementTypes> { node.OriginalName.ConvertOriginalHtmlElementNameIntoHtmlElementType() }); //....ToString()// .Set(new List<HtmlElementTypes> { node.OriginalName.ConvertOriginalHtmlElementNameIntoHtmlElementType() }); codeEntry.Locators.AddRange( new List <LocatorDefinition> { node.CreateIdLocator(), node.CreateNameLocator(), node.CreateClassLocator(), node.CreateTagLocator(), node.CreateLinkTextLocator(), node.CreateCssLocator(), node.CreateXpathLocator() }); codeEntry.Locators.RemoveAll(locator => null == locator || locator.SearchString == string.Empty); codeEntry.Locators.ForEach(locator => locator.IsBestChoice = false); codeEntry.Locators.OrderBy(locator => (int)locator.ElementSearchTypePreference).First().IsBestChoice = true; return(codeEntry); }
public void WhenIStartTheParserApp() { _entry = TestFactory.Instance.GetEntryExpected(_doc, new[] { typeof(Bootstrap3), typeof(PlainHtml5) }, 0); }
void WhenParsing(int elementPosition) { _entry = TestFactory.Instance.GetEntryExpected(_doc, new[] { typeof(Bootstrap3) }, elementPosition); }
void WhenParsing(string expectedTypeName) { _entry = TestFactory.Instance.GetEntryExpected(_doc, new[] { typeof(Bootstrap3) }, expectedTypeName); }
public Bootstrap3Tests() { _entry = null; _doc = null; }
public PlainHtml5Tests() { _entry = null; _doc = null; }
void WhenParsing(string expectedType) { _entry = TestFactory.Instance.GetEntryExpected(_doc, new[] { typeof(PlainHtml5) }, expectedType); }
void WhenParsing(string expectedType) { _entry = TestFactory.Instance.GetEntryExpected(_doc, new[] { typeof(JqueryBootstrapSelect) }, expectedType); }
public JqueryBootstrapSelectTests() { _entry = null; _doc = null; }
public JdiTests() { _entry = null; _doc = null; }
public PiecesOfCodeTests() { _entry = null; _doc = null; _entries = new List <IPieceOfPackage>(); }