New answers tagged

0

Simplest might be 'span:contains("Add Photo's/Video")' To ensure it's a link you can use 'a span:contains("Add Photo's/Video")' If you need more specificity you may need 'div.pagelet_composer a span:contains("Add Photo's/Video")'


1

Julian brought up good points, i.e. make sure your element is unique and does not change. If it is not, then make sure you talk to your developer to add an attribute that is unique and unchanging. You can do driver.findElement(By.cssSelector("li input[class='edit']"));


0

Normally when I have trouble to find an element, I open the selenium IDE and click on this element and then see what the identifier that it captures



Top 50 recent answers are included