This code works fine in Firefox browser, but failing in Chrome browser saying not able to find element. Below is the html src code, i need to locate header .Kindly let me know how to get there ?
JAVA code:
WebElement frame = base.getWebDriver().findElement(By.xpath("//iframe[@id='cwindow']"));
base.getWebDriver().switchTo().frame(frame);
Thread.sleep(5000);
WebDriver driver = gen.getWebDriver();
WebElement form = base.getWebDriver().findElement(By.xpath("//div[@class='form input']"));
HTML code:
<iframe id="cwindow" name="cwindow" src="https://incentivesqa.ford.com/Flip/?app_context=t2&lang=en&make=Ford&model=Mustang&year=2014&zipcode=48126&paCode=03050&leadsource=FDAF-Inventory&altleadsource=SI&env=getlocaloffers&pageName=fv: si: vls: ford mustang&plan_type=MSRP">
<!DOCTYPE html>
<html>
<head>
<body>
<script src="/Scripts/Ford.Omniture.Control.js" type="text/javascript">
<script type="text/javascript">
<script type="text/javascript">
<script type="text/javascript">
<script type="text/javascript">
<div class="header">
<div class="clear"></div>
<div class="incentive">
<script type="text/javascript">
<div class="flipFilter">
<select style="display : none;" name="modelDescription">
<div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="lcol" style="">
<div class="rcol">
<script type="text/javascript">
<div class="form thankYou">
<div class="form working">
<div class="form input">
<h2>Fill out the form below to receive special offers</h2>
<p class="error">
<table cellspacing="0" cellpadding="0" border="0">
<input id="address" type="hidden" value="" name="address">
</div>
<div class="aprLinkContainer">
</div>
<div class="clear"></div>
<div id="printContainer" style="display:none;">
<script type="text/javascript">
<script type="text/javascript">
</div>
<div id="omnitureTarget"></div>
<div id="dartTarget">
<div id="efficientFrontierTarget"></div>
</body>
</html>
</iframe>