how can i capture src in following xml by using cssSelector or Xpath ?
<INPUT src="/TelsimGlobal/Menu/image3.gif" type=image>
i tried to execute following ones but always faced with "Unable to find element" error. any suggestion ?
driver.findElement(By.xpath("//img[@src='/TelsimGlobal/Menu/image3.gif']"));
driver.findElement(By.cssSelector("[src]"));
driver.findElement(By.cssSelector("a[src='/TelsimGlobal/Menu/image3.gif']"));
Niels van Reijmersdal
32.7k4 gold badges59 silver badges125 bronze badges
asked Apr 15, 2019 at 13:37
1 Answer 1
It is not an image (IMG) or a link (A) tag, it is a INPUT tag:
By.xpath("//input[@src='/TelsimGlobal/Menu/image3.gif']")
answered Apr 15, 2019 at 13:47
-
@santino87 Upvote or accept the answer if this/any answer is/was helpful to you for the benefit of future readers. see: stackoverflow.com/help/why-voteMoshe Slavin– Moshe Slavin2019年04月16日 08:27:29 +00:00Commented Apr 16, 2019 at 8:27
Explore related questions
See similar questions with these tags.
default