Hi,
I am trying to figure out how I can obtain element from another element.
Let's say I already found some element, e.g. <div> container, like this:
Now, I need search another element, .e.g. <a> which is inside this <div> container. Moreover this <a> element can not be direct child of <div> element, and can be located more deeper.
So, when I try such code to find this <a> over Xpath expression:
But, in such case I receive first anchor on the page instead of first anchor inside
As I understand all
So my question is - how can I use
Thanks.
I am trying to figure out how I can obtain element from another element.
Let's say I already found some element, e.g. <div> container, like this:
Element divPanel = ActiveBrowser.Find.ById(
"div1"
);
So, when I try such code to find this <a> over Xpath expression:
Element anchor = divPanel.Find.ByXPath(
"//a"
);
divPanel element
.As I understand all
Find
.ByXXX methods perform search starting from root page object. So my question is - how can I use
Find
.ByXXX methods to start search from specified Dom node ?Thanks.