Thursday, March 13, 2025

selenium webdriver – A number of browser help


Cross Browser testing has a grow to be a significant a part of any automation and a very good QA firm will all the time use this logic of their automation frameworks.

When you have carried out Chrome in your framework, then there are 02 methods utilizing which you’ll execute your scripts on different browsers –

Choice 1:
Replace your current ‘Webriver load methodology’ with the code to load IE and Firefox driver. You could have so as to add some capabilities together with this as nicely. Including Capabilities will resolve a lot 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", "Home windows")
            

For IE, sure pre-requisites are talked about beneath –
a) Allow protected mode.
b) Replace Browser zoom settings to 100%
c) Use solely 32 bit driver even in case you are utilizing 64 bit machine.

Use beneath 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 even attempt on Edge utilizing capabilities like –

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

Choice 2:
These days, most {of professional} QA firms whether or not within the subject of Safety testing companies or Software program testing companies, BrowserStack is getting extensively used. In case your code is stringent to replace, you should utilize this cloud expertise the place you should utilize execute your check scripts on cloud browsers by writing a separate file to invoke distant browsers.

Observe : BrowserStack is a paid instrument however presents trial model as nicely.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

PHP Code Snippets Powered By : XYZScripts.com