Forum Discussion
Bharadwaj
Contributor
Hi,
You wont be able to use a search pattern in this case as className property does not exist in any of the search patterns. The work around for this is as below
IEnumerable<IWebElement> panelObjects = page.FindAll<IWebElement>(new WebCellElementPattern { objectType = "Panel" }, 1000,3000) IWebObject myPanelObject = panelObjects.Where(l => l.GetProperty<string>("className").Contains("yourclassname"))
You can filter the object with class name you want using LINQ on the collection
panelObjects
.
sergi
6 years agoContributor
Thanks for the suggestion.
I was looking for something more straightforward and less like a workaround, but I've already had to do this in other use cases.
Related Content
- 4 years agomehdisinger
Recent Discussions
- 2 months agoSD2