0
votes

I tried to run a selenium webdriver script in internet explorer using IE driver server. It launched the browser and home page, but it's not clicking "Next" button and not proceeding to further pages.Can anyone please tell me the reason behind it and what to do to go to further pages.

I tried to run the script in multiple browsers.

@BeforeTest public void launchBrowser(String browser) throws Exception { if(browser.equalsIgnoreCase("FF")) { log.info("Launching Firefox Browser");

        driver=new FirefoxDriver();
    }
    else if(browser.equalsIgnoreCase("IE"))
    {
        System.setProperty("webdriver.ie.driver","D:\\Drivers\\IEDriverServer.exe");

        log.info("Launching Internet Explorer Browser");

        driver=new InternetExplorerDriver();
    }
    else if(browser.equalsIgnoreCase("GC"))
    {
        System.setProperty("webdriver.chrome.driver", "D:\\Drivers\\chromedriver.exe");

        log.info("Launching Chrome Browser");

        driver=new ChromeDriver();
    }


    driver.manage().window().maximize();

    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
}
1
Can you please post the code that you have tried?Mosam Mehta

1 Answers

0
votes

There can be following reasons for test failing

  1. IE renders object slow when compared with chrome or fire fox which means your script is trying to click object even its not ready yet so increase time out to 50-60 sec to solve this issue

  2. If you are using xpath then this issue is due to that because IE x path expression is different then chrome and FF