update function getParent to get parent of specified element
Merge pull request #114 from herbertsg/TestDependentFields

update function getParent to get parent of specified element