New answers tagged


Please consider the following advice: preceding: css selector currently does not support traverse backwards, it may be supported in the future. following: Element E1 following some sibling E2, css = E2+E1 Element E1 following sibling E2 with one element in between, css = E2+ * + E1 Some element immediately following E, css = E + *


My approach would be something along the lines of WebElement yourElement List<WebElement> Elements = driver.findElements(By.tagName("span")); for(int Counter = 0; Counter < Elements.size(); Counter++){ if(Elements.get(Counter).getAttribute("class").contains("glyphicon") && Elements.get(Counter).getAttribute("aria-hidden").equals("true")...


can you please try the options below: By Xpath: button[@type='submit'] button[@class='btn btn-success'] button[@type='submit'][@class='btn btn-success'] By css selector: button[type='submit'] button[class='btn btn-success'] button[type='submit'][class='btn btn-success'] Any one expression above should locate this element, please tell me if it still ...


If the class name is unique in the page then you can use the class name. Keep in mind that the class name might not select the selector you need if there are multiple elements with the same class. As an alternative check if you have other unique attributes for which you have a method or use a css/Xpath selector. If you don't have any other attributes i ...

Top 50 recent answers are included