When using
driver.findElement(By.xpath(".//*[@id='bodyPartContainer']/div[1]")).click();
to select a part of the human body image, I'm encountering the following exception in webdriver:
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//*[@id='bodyPartContainer']/div[1]"}
<head>
<body style="height: 100%">
<div class="container-fluid">
<div class="row">
<!-- Name-->
<div class="row rowTop">
<!-- Email -->
<div class="row rowTop">
<!-- Date of Birth-->
<div class="row rowTop">
<!-- Human Body Selection -->
<form id="vForm" class="form-horizontal" role="form" data-toggle="validator" novalidate="true">
<!-- Type of Request -->
</div>
</div>
</form>
</div>
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<script type="text/javascript">
// JavaScript functions here...
</script>
</body>
</html>
I would appreciate any assistance with this issue. Thank you.