I'm trying to create a bot. The functionality I need now is to find a way to get only childs of an element without sub-childs. Take this as example:
<Body> <child1>Hi</child1> <subChild>Woh</subChild> <child2>Hey</child2> <subChild>Weee</subChild> </Body> </HTML>
I want to find all child elements for but when I do so by:
childs = Body.find_elements_by_xpath("//*")
It's length by len(childs) is 4 instead of 2. Hope you understood.
Any help will be appreciated.