I am trying to select and click an option within a dropdown using C# code with Selenium Webdriver and Nunit Framework. I wrote the following code:
IWebElement dropdown = Driver.FindElement(By.XPath("//*[@id='lane_id']"));
new SelectElement(dropdown).SelectByText("All Lanes");
dropdown.Click();
Now I know that dropdown.click() is wrong as it does not have the XPath for the selected option. But I want to somehow click the selected option.
P.S: Apologies for any mistake / community violations, this is my first ever query on stackoverflow.