Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set chrome options for selenium HQ with QAFextended webdriver #428

Open
ashoksagi opened this issue Oct 3, 2022 · 2 comments
Open

Comments

@ashoksagi
Copy link

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

@cjayswal
Copy link
Member

cjayswal commented Oct 3, 2022

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

@ashoksagi
Copy link
Author

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");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants