Clarification - Code | Selenium C# Forum
20% Off Lockdown Learning Discount Avail now

Clarification - Code

S
Saranyaa Post on 24/02/2020

I noted the following code in our automation project. Can I understand the get functionality here?

 

Public IWebElement CDropdrown

{

Get

{

Return Driver.FindElement(By.Id("Company"));

}

}

S

Instructor

Support Team Reply on 28/02/2020

It is returning the IWebelement

S
Saranyaa Reply on 28/02/2020

What's the advantage of writing code like above?

Can this function be written without Get? Detailed explanation will be helpful