qaf icon indicating copy to clipboard operation
qaf copied to clipboard

Unable to set chrome options for selenium HQ with QAFextended webdriver

Open ashoksagi opened this issue 2 years ago • 2 comments

QAF Version-3.1.0

Note: only the latest version is supported

Steps To Reproduce

1.Conncet to selenium HQ with chrome options
2.Chrome Browser opens in selenium HQ
3.no website will be opened, data: [is]([url]([url](url))) displayed forever in address bar.

Expected behavior

Tests should execute in selenium HQ

Actual behavior

Tests are failing since none of the pages are loaded in address bar, instead data: is displayed.

Is the issue reproducible on runner?

  • [X ] Maven
  • [ X] Eclipse

Test case sample

Please, share the test case (as small as possible) which shows the issue We are using below code to execute chrome tests in selenium Grid.

        ConfigurationManager.getBundle().setProperty(ApplicationProperties.REMOTE_SERVER.key, Global.SELENIUM_GRID_URL);

        Return new QAFExtendedWebDriver();

But now we want to use selenium HQ to execute our tests. So, updated below code to use selenium HQ URL

ConfigurationManager.getBundle().setProperty(ApplicationProperties.REMOTE_SERVER.key, Global.SELENIUM_HQ_URL);

        Return new QAFExtendedWebDriver();

And now we want to set few chrome options as well to fix few issues in tests. So, added below code. Even though we have set options as per documentation it is not setting options.

ConfigurationManager.getBundle().setProperty(ApplicationProperties.REMOTE_SERVER.key, Global.SELENIUM_GRID_URL);

ConfigurationManager.getBundle().setProperty(ApplicationProperties.DRIVER_ADDITIONAL_CAPABILITIES.key,"{'goog:chromeOptions':{'args':['--start-maximized','--ignore-certificate-errors','--auth-negotiate-delegate-whitelist=*dms-test.lfg.com','--start-maximized','--disable-web-security','--disable-gpu','--no-sandbox','--disable-dev-shm-usage','--allow-running-insecure-content','--log-level=3','--no-session-id',' --ignore-certificate-errors']}}");

new QAFExtendedWebDriver();

We tried the below alternative method, to set chrome options. It is setting the options(can verify manually in chrome browser) but not opening the URL when we execute the tests. Please see below screenshot.

return new QAFExtendedWebDriver(new URL(Global.SELENIUM_GRID_URL), new BrowserFactory().setChromeOptions()));

Attached logs and images logs.txt Picture1

ashoksagi avatar Oct 03 '22 17:10 ashoksagi

This looks issues with custom implementation. please connect to your internal project support team who maintains implementation.

cjayswal avatar Oct 03 '22 21:10 cjayswal

I am facing same issue for edge in IE mode. Same code works fine without QAF in my laptop. Config wdmIE = WebDriverManager.iedriver().arch32().config().setIExplorerDriverVersion(version); System.setProperty("webdriver.ie.driver", Global.WINDOWS_USER_HOME + "\.cache\selenium\IEDriverServer\win32\" + wdmIE.getIExplorerDriverVersion() + "\IEDriverServer.exe"); InternetExplorerOptions ieOptions = new InternetExplorerOptions(); ieOptions.attachToEdgeChrome(); ieOptions.ignoreZoomSettings(); ieOptions.withEdgeExecutablePath("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"); QAFExtendedWebDriver driver = new InternetExplorerDriver(ieOptions); driver.get("http://www.bing.com");

ashoksagi avatar Oct 04 '22 16:10 ashoksagi