We've been running through some basic selenium tests in our .net app to make sure all the pages you can get to from our menu will load. I am currently having an issue where some but not all of the links that are in submenus will pass in firefox but not in chrome.
I've tried this a couple of different ways.
a)
TomBrowser.Driver.FindElement(By.LinkText("Manage Inventory")).Click();
TomBrowser.Driver.FindElement(By.PartialLinkText("Inventory Report")).Click();
TomBrowser.Wait(x => x.Title.ToString().Equals("Current Inventory Report", StringComparison.InvariantCultureIgnoreCase));
b)
TomBrowser.Driver.FindElement(By.LinkText("Reports")).Click();
TomBrowser.Driver.FindElement(By.Id("side-menu")).FindElement(By.ClassName("active")).FindElement(By.PartialLinkText("Dispense Report")).Click();
TomBrowser.Wait(x => x.Title.ToString().Equals("Dispense Report", StringComparison.InvariantCultureIgnoreCase));
Both of these tests work in firefox but not in chrome, however there are also tests that work in both firefox and chrome that follow this same format.
The error messages received are:
OpenQA.Selenium.NoSuchElementException : no such element: Unable to locate element: {"method":"partial link text","selector":"Inventory Report"} (Session info: chrome=63.0.3239.84) (Driver info: chromedriver=2.33.506120
and
OpenQA.Selenium.NoSuchElementException : no such element: Unable to locate element: {"method":"partial link text","selector":"Dispense Report"} (Session info: chrome=63.0.3239.84) (Driver info: chromedriver=2.33.506120
Edit: my question is why is this working in firefox but not chrome and why does it only fail in chrome for some tests but not others, not asking about how to find elements.