Forum Discussion
JuliaBernikova
7 years agoSmartBear Alumni (Retired)
Hi,
You can add custom properties to the web element search pattern using the Add method as described in the "Understanding Object Identification" article. Here is a quick and simple example:
IControl panel = driver.Find<IWebBrowser>(new WebBrowserPattern() { ObjectIdentifier = "chrome" }).Find<IWebPage>(new WebPagePattern() { URL = "https://smartbear.com/" }).Find<IControl>(new WebElementPattern() { ObjectType = "Form", idStr = "form" }).Find<IControl>(new WebElementPattern() { ObjectType = "Panel", }.Add("className", "nav-addition*"), 6);
Hope this helps!
- sergi7 years agoContributor
Thanks for the reply.
I am aware of the Add method. My question was more focused on the fact of having multiple classes applied to an element.
Is the "*" (in "nav-addition*") doing the trick?
Related Content
- 10 months ago
Recent Discussions
- 27 days ago
How to compare images?
Solved2 years ago- 5 months ago
- 10 months ago