Currently, our automation suite runs on chrome (has been designed for chrome). We used cucumber with Java and Selenium. We are trying to make the current automation suite multi-browser compatible. The current automation code supports Firefox 50% and IE the least.

How do we make this code work on IE, Firefox? Please suggest the easy ways ...

Thank you in advance

  • Did you considered running the test with that other browsers and fixing any bugs? Or this approach is too hard? Dec 5 '17 at 20:18
  • Yes I did run with other browsers. It least supports IE and partially supports firefox. In IE, some fields cannot be detected and some elements are not identified.
    – user29546
    Dec 5 '17 at 21:10
  • @PeterMasiar Instead of changing the whole code, I am trying to do fixes to the present code and support IE. And also, It works very slowly on IE. Thanks!!
    – user29546
    Dec 5 '17 at 21:12
  • Have you looked at Selenium grid?
    – Marit
    Jan 25 '18 at 8:08

Usual approach is to develop your tests using custom wrappers, use those wrappers instead of bare calls. If different actions/tweaks are required for different browsers, you fix the wrapper (in a single place) and your tests should run without changes.

Of course it might be too late for you now, if you use bare calls in your tests.

Every such refactoring should a be a good learning experience.

As the saying goes:

  • To avoid mistakes you need a lot of experience.
  • Experience is a result of learning from past mistakes.



Cross Browser testing has a become a vital part of any automation and a good QA company will always use this logic in their automation frameworks.

If you have implemented Chrome in your framework, then there are 02 ways using which you can execute your scripts on other browsers -

Option 1: Update your existing 'Webriver load method' with the code to load IE and Firefox driver. You may have to add some capabilities along with this as well. Adding Capabilities will resolve most of the challenges -

For Firefox use capabilities like -

capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("os_version", "10");
capabilities.setCapability("browser", "Firefox");
capabilities.setCapability("browser_version", "78.0");
capabilities.setCapability("os", "Windows")

For IE, certain pre-requisites are mentioned below - a) Enable protected mode. b) Update Browser zoom settings to 100% c) Use only 32 bit driver even if you are using 64 bit machine.

Use below capabilities -

capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
capabilities.setCapability("ensureCleanSession", true);
capabilities.setCapability("ignoreZoomSetting", true);
capabilities.setCapability("ignoreProtectedModeSettings", true);
capabilities.setCapability("ignore-certificate-error", true);
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

You can also try on Edge using capabilities like -

  capabilities.setCapability("os_version", "10");
  capabilities.setCapability("browser", "Edge");
  capabilities.setCapability("browser_version", "83.0");
  capabilities.setCapability("os", "Windows");

Option 2: Nowadays, most of professional QA companies whether in the field of Security testing services or Software testing services, BrowserStack is getting widely used. If your code is stringent to update, you can use this cloud technology where you can use execute your test scripts on cloud browsers by writing a separate file to invoke remote browsers.

Note : BrowserStack is a paid tool but offers trial version as well.

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.