I am using Java and Selenium to write a test. In my DOM, I have two svg
tags. One of them has more that 2 inner path
tags. I need to get this svg
so I used:
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
"//*[local-name() = 'svg' and count(.//path)>'2']")));
or
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
"//*[local-name() = 'svg'] [count(.//path)>'2']")));
but it doesn't work. I need to know what's wrong with that so please do offer other ways around. Thanks.
by the way it worked for:
//*[local-name() = 'svg' and count(.//*[local-name() = 'path' ])>'1']
or
//*[local-name() = 'svg'][ count(.//*[local-name() = 'path' ])>'1']