Clarification - Code | Selenium C# Forum
S
Saranyaa Posted 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"));

}

}


A
Ashish Thakur Replied on 28/02/2020

It is returning the IWebelement


S
Saranyaa Replied 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