0

I have two applications - App A works in Chrome and App B does work only in IE.

  • I have to fill a form in app A and validate the data that i have entered in App B. This entire process is part of the same test case. Is there any work around to handle this tricky situation?

Appreciate if you can provide a work around ASAP.

3

In your code you should instantiate two drivers. One instance for Chrome and the second one for IE. Now you can operate with both the browsers. Below is the example in Java:

public static void main(String[] args) {

    // Configure both drivers
    System.setProperty("webdriver.chrome.driver", "Path to your chromedriver");
    System.setProperty("webdriver.ie.driver", "Path to your IE driver");
    WebDriver chromeDriver = new ChromeDriver();
    WebDriver intExpDriver = new InternetExplorerDriver();

    // Open the reuired pages
    chromeDriver.get("https://google.com");
    intExpDriver.get("https://google.com");

    // Operate with each driver separately
    chromeDriver.findElement(By.xpath("//input[@id='lst-ib']")).sendKeys("My Search in Chrome");
    intExpDriver.findElement(By.xpath("//input[@id='lst-ib']")).sendKeys("My Search in IE");

    // Do not forget to release the resources
    chromeDriver.close();
    intExpDriver.close();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.