Codeceptjs fails to find xpaths that use the second or greater instance of the element.
For example:
(.//*[contains(@cname, 'Girls')]/ins)[3]
Always fails, codeceptjs returns that xpath is an "invalid locator" which is weird because every other tool (like Chrome inspector) seems to find locators fine like that.
I agree. It should work so but it don't :(
Is it true for {xpath: "(.//*[contains(@cname, 'Girls')]/ins)[3]" } locator too?
Is it true for
{xpath: "(.//*[contains(@cname, 'Girls')]/ins)[3]" }locator too?
Well, it would be fine if you test it yourself and write back here about results, isn't it? )
Is it true for
{xpath: "(.//*[contains(@cname, 'Girls')]/ins)[3]" }locator too?
I've seen it fail for this more complete syntax as well, in fact I think this would fail for me for a different reason entirely (if I didn't put the "xpath" in quotes when using codeceptjs).
@Jtech42 locators with indexes pose issues for most frameworks. Try being a bit more precise in selecting the secondary element ie:
{xpath: "(.//*[contains(@cname, 'Girls')]/ins[contains(text(), 'some InnerHTML text you care about
')])" }