I want to login into application through automation without adding compatibility view settings in IE. But the automation is stopping at login page by not entering any username and password. With compatibility view setting I am able to login. But I am unable to see menus in the application in this scenario. I am able to see menus without adding compatibility settings. The final thing is I should be able to login without adding compatibility view through automation using java. Could anybody please help me on this ?
driver=new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
ngdriver = new NgWebDriver((JavascriptExecutor)driver);
driver.get(LocatorValues.getProperty("url"));
fis=new FileInputStream(System.getProperty("user.dir")+.
("\\src\\main\\java\\ExcelData\\Exceldata.xls"));
workbook=new HSSFWorkbook(fis);
Sheet=workbook.getSheet("login");
WebDriverWait wait = new WebDriverWait(driver,30);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='LoginForm:txtUname']")));
driver.findElement(By.xpath("//*[@id='LoginForm:txtUname']")).click();
String username_Excel=Sheet.getRow(1).getCell(0).getStringCellValue();
element.sendKeys(username_Excel);
Thread.sleep(1000);
getxpath("userName").sendKeys(username_Excel);
getxpath("userName").sendKeys(Keys.ENTER);
String password=Sheet.getRow(1).getCell(1).getStringCellValue();
getxpath("password").sendKeys(password);
getxpath("password").sendKeys(Keys.ENTER);
Thread.sleep(1000);
Clearing the cache in IE everytime before doing automation is worked for me.