Closed SubjectiveReality closed 7 years ago
Added an 'exactMatch' option to NgByBinding & NgByRepeater locators :
var Blahs = row.FindElements(NgBy.Binding("p[0].Blah", true));
Try new v0.10.1 and let me know
Unfortunately, it appears to have a conflict with the PageFactory...
System.ArgumentException was unhandled by user code
HResult=-2147024809
Message=Custom finder type must expose a public constructor with a string argument
Source=WebDriver.Support
StackTrace:
at OpenQA.Selenium.Support.PageObjects.ByFactory.From(FindsByAttribute attribute)
at OpenQA.Selenium.Support.PageObjects.DefaultPageObjectMemberDecorator.CreateLocatorList(MemberInfo member)
at OpenQA.Selenium.Support.PageObjects.DefaultPageObjectMemberDecorator.Decorate(MemberInfo member, IElementLocator locator)
at OpenQA.Selenium.Support.PageObjects.PageFactory.InitElements(Object page, IElementLocator locator, IPageObjectMemberDecorator decorator)
at OpenQA.Selenium.Support.PageObjects.PageFactory.InitElements(ISearchContext driver, Object page)
^ in conjunction with something like
[FindsBy(How = How.Custom, CustomFinderType = typeof(NgByBinding), Using = "p[0].BlahDescription")]
private IList<IWebElement> lstBlahDescriptions { get; set; }
Looks like I've introduced a regression. I'll fix or this week-end.
Added 'NgByExactBinding' & 'NgByExactRepeater' to support Page Objects pattern (coherent with original Protractor project).
var Blahs = row.FindElements(NgBy.ExactBinding("p[0].Blah"));
[FindsBy(How = How.Custom, CustomFinderType = typeof(NgByExactBinding), Using = "p[0].Blah")]
Try new v0.10.2 and let me know
Working great! Thank you!
Ran into this today. I have two bindings on a page I am testing:
{{p[0].Blah}}
{{p[0].BlahDescription}}
When I do the following, both of the above elements are found instead of the expected one:
var Blahs = row.FindElements(NgBy.Binding("p[0].Blah"));