Forum Discussion
JuliaBernikova
Alumni
8 years agoHi,
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!
- sergi8 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?