I need to use selenium to click on button but I'm Facing some problems
I try this code but show me error "Selenium.InvalidSelectorException: 'invalid selector"
IList link = driver.FindElements(By.ClassName("button postfix"));
foreach (IWebElement elem in link)
{
if (elem.GetAttribute("ng-click").Equals("quickSearch.search()"))
elem.Click();
}
html page code
<a href="javascript: void(0);" class="button postfix" ng-click="quickSearch.search()" analytics-on="click" analytics-event="InventoryManagementSearchKeyword" sc-omniture-props="InventoryManagementAllSS"><i class="fi-magnifying-glass"></i></a>
I try to use id but there's no Id for the button so I don't know how to use it