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
7 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
- 3 years ago
- 3 years ago
- 7 years ago
- 10 months ago
Recent Discussions
- 31 days ago
- 6 months ago