I am using Selenium Remote web driver to test my application in IE9 and the test is running fine in the remote machine. The only problem I am facing is, the IE 9 browser is minimized in the task bar as it opens. I need it to open so that I can see it by default. The capabilities currently set is as follows.
capabilities.setVersion("9");
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
capabilities.setCapability(CapabilityType.LOGGING_PREFS, prefs);
capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,UnexpectedAlertBehaviour.ACCEPT);
capabilities.setCapability("ignoreZoomSetting", true);
The code to maximize the window driver.manage().window().maximize() works fine as I can see the window maximized when I click on the IE icon in the system tray.
What am I missing to open the window?
Thanks in Advance,
DeeJay
If you have access to that PC with admin's rights:
Open window's registry, look for this key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
And delete the key: Window_Placement
Then restart
Related
Scenario :
There is a button/link on a page opened in chrome browser and after clicking on a button/link it will navigate to the other link and opens in systems default browser i.e. Internet Explorer.
How to change the focus from chrome browser to internet explorer in selenium?
This is not possible.
You are starting your Chrome browser using the Chromedriver. You cannot handle Internet Explorer with your Chromedriver. You would need to use the IEDriver.
But as you did not start Internet Explorer using Selenium you would need to re-use an existing session. This is officially not supported see.
Nevertheless Tarun Lalwani was able to achieve this. See here and here.
I would suggest to save the link of the button/link before clicking on it and then start a new session using Internet Explorer and navigate to the saved link.
I am automating the application using selenium which is enabled with SSO(VIDM) integration which will take my system domain name and password. The moment I hit the application URL, It will process the SSO(VIDM) and displaying the browser pop up with SSL certificate , OK button. I am unable to locate "OK" button as inspect is blocked for that pop up.
Manual Work Around noticed: Able to select that certificate from the pop up with out clicking okay button by placing the cursor in Chrome driver address bar and then perform enter using the system keyboard.Please see the image here
Add the below chromedriver option to launch specific profile.
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=/path/to/your/custom/profile");
ChromeDriver driver = new ChromeDriver(options);
Refer to chromedriver page for more information.
ChromeDriver Capabilities
I m running a UI test in which IE 11 driver clicks on a link which opens a new window then it dose further test. this works as expected on my local machine but when I run this test in my remote desktop (selenium grid) IE driver instantly tries to close the new window and a alert for closing the window appears this is causing my test to fail.
Can some one please enlighten me what is causing this behavior in IE while running on grid only. And how to solve this issue ?
thanks.....
With version 2.30, selenium webdruiver has given in built support for Safari browser.
I want to know how to handle SSL Certificates in Safari (which is installed on Windows).
Below piece of code I tried but its not working:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setBrowserName("SAFARI");
driver = new SafariDriver(capabilities);
driver.get("https://MYDUMMYSITE");
I have countered the same problem. It seems that the Safari browser is using the same certification mechanism as Internet Explorer, and theoretically, you can use it to install certification and it should solve the problem.
Instruction can be found here
This did not work for me, so I used AutoIt script to click on the continue button, compiled the script the EXE and called it from my test.
The script I used:
WinWait("[CLASS:#32770]","",60)
WinActivate("[CLASS:#32770]","")
Send("{SPACE}")
Baiscally, it will wait 60 seconds for the "Safari can't verify the identity of the website" message, set the window on focus and click on the space bar button.
The application I am testing requires pop-up to be enabled. When a launch a new Firefox profile I get the browser message
Firefox prevented this site from opening a pop-up window
with a button on the right called Options. I can manually click the Options button and select to Allow popups from ....
Question is how can I use profile.setPreference to set to allow popups from my website and also not show this Firefox message?
You can save your current Firefox prifile with allowed popups and load it from file like in this case: https://stackoverflow.com/a/6830109/1165331
save you current working profile with popups via browser and loat it.