Tag Info

Hot answers tagged


There are two parts to this. The first is that you need to be sure that your xPath is correct. One way to validate that is to use a tool like Firefinder (a firefox extension for firebug). Navigate to your page and be sure the element you need is present and then hit f12 and go to the FireFinder section. Enter in the xpath you are using and see if it can ...


Can you find it if you use the .Text and then clicking it if it matches? String Expectedtext = "Procurement" String ProcurementButtonText = driver.FindElement(By.XPath("//td")).Text; if (ProcurementButtonText == Expectedtext) { driver.FindElement(By.XPath("//td")).click() }

Only top voted, non community-wiki answers of a minimum length are eligible