You should specify a tag to start out from, if you want "all element's immediate children", you'd easily get all elements, but that isn't what you really want.
To get "all immediate children of an element but not their children" for the body, use
body > *.
Or another example would be if you want to get all direct descendants of <div id='question'>, use div#question > *.
If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium certification online!