Temporarily I upgrade my sofware for automation web test.
I had Selenium 2.41 and Firefox27 working fine. When I try to upgrade the software, there is no problem about Selenium (I can upgrade to the latest release 2.45 and it's working fine with Firefox27) but I can't upgrade to any Firefox version higher than 29...and this is a problem for us.
I tried to run my test but I get this exception at some point:
"Failed to start new browser session, shutdown browser and clear all session data
org.openqa.selenium.server.RemoteCommandException: timed out waiting for window 'null' to appear"
Any idea?
Best regards and thanks
Disclaimer: I'm using Selenium's .NET bindings, not Java. I don't think that will make a difference in this case.
Selenium 2.44 had an issue with Firefox 36, but this was resolved in Selenium 2.45. It's possible that Firefox versions between 29 and 35 might be incompatible with Selenium 2.45, although this is just a guess on my part.
I had an issue with Seleinum 2.45 driving Firefox version 38: when instantiating the Firefox driver with no profile, an instance of Firefox would load and immediately crash to desktop; subsequently another instance would load as normal.
I found that the issue didn't occur when instantiating the Selenium Firefox driver from an existing profile, so my workaround was to create a blank profile, launch Selenium's Firefox driver using a temporary copy of that profile; then at the conclusion of the test, delete the temporary copy.
Try launching the Firefox driver with an existing profile.
Related
I am just trying to figure out if anyone else has seen their Selenium tests run significantly slower (takes 2+ minutes to start) when they load a profile into the FirefoxDriver as shown in:
Selenium a default profile for the Firefox
The question originator of the above post mentioned this issue in a comment, but never updated whether he fixed this slowness issue.
At some point my tests stopped running all together and I started getting the error
org.openqa.selenium.WebDriverException: java.io.Exception: unexpected end of stream on Connection.
If I remove the profile option from the FirefoxDriver call then the test runs within 5 seconds of selecting "RUN" but the test fails because the default profile Selenium uses does not have the certificates I need to access my site.
Anyone else in the same boat or know how to fix this? How do you adjust how much information is saved within a profile?
Firefox Version: 60.3.0
Selenium Version: 3.14.0
GeckoDriver Version: 0.23.0
OS: Linux Redhat 6
Eclipse Version: Neon
Code:
WebDriver browser;
System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.get("SeleniumUser");
FirefoxOptions options = new FirefoxOptions().setProfile(ffprofile);
browser = new FirefoxDriver(options); // takes a long time and eventually fails here
browser.get("site.url");
If you take out the {options} parameter from the new FirefoxDriver() call the test will start in about 5 seconds.
Keeping the options causes the error "org.openqa.selenium.WebDriverException: java.io.Exception: unexpected end of stream on Connection" as stated above.
When you initiate the process to load a new/existing FirefoxProfile through GeckoDriver the underlying framework consisting of:
The Driver (Selenium binding)
The Server (GeckoDriver)
The Client (Firefox Browser)
Needs to initialize and intercommunicate with different internal modules.
You can find a detailed discussion on how to access a FirefoxProfile through GeckoDriver with in Cannot resolve constructor FirefoxDriver(org.openqa.selenium.firefox.FirefoxProfile)
Additionally the saved:
Bookmarks
Password
User Preferences
are also loaded when an existing FirefoxProfile loads. Hence some added time is required.
You can find a detailed discussion in webdriver.FirefoxProfile(): Is it possible to use a profile without making a copy of it?
When I am trying to load the Selenium FireFoxDriver, process is taking more time to invoke the browser. I have tried for lot of options like disabling the auto updates and etc. But all efforts are in vain. So I have decided to load the FirefoxDriver on startup of the Server (i.e, with load-on-startup time as 0 in web.xml when container initializes). Are there any cons with this approach? Also please suggest if there is any better way to do this.
Thanks in advance!!!
In general, WebDriver supports Firfox and Safari browsers by default. There is no need to perform any configuration for this. Please find below for the sample code which initializes the browser
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com/");
The above code will start the firefox browser installed in your machine and launches the google page. If there is a mismatch between the selenium version of firefox version the browser will be started, but would not launch the google application.
Hope this helps.
When ever i try to automate my application in firefox its taking so much time to load and finally showing "The Connection had Timed Out",and the same app is working perfectly in IE and Chrome.Is there any way to speed up the FireFox? or any browser level settings to be done?.Im using webDriver 2.37,FF 25.0
Any help is appreciated.
Thanks,
Ajay Talpur
Check this CHANGELOG. Webdriver latest version supports only till Firefox 24. Downgrade your firefox version and you will not see this issue.
Check Proxy settings, as Chrome used IE proxy settings application might have working correct over there. You have to set proxy for Firefox it will not pick it up from IE.
We have a requirement to test Google Chrome on Android Emulator using WebDriver. I am using WebDriver and I am able to test on default browser by installing Selenium Server on Android Emulator. But when I set desired capabilities as chrome and platform Android using RemoteWebDriver, I am able to start tests but it opens default browser and not chrome. Any ideas!?
This is not yet possible with Android.
Currently you can only run webdriver tests against the apk built by Selenium, which is not the Google Chrome browser.
At GTAC 2013 Ken Kania (a Google Engineer) announced the alpha of the Chrome Driver for Android during his presentation. https://docs.google.com/presentation/d/14xU207jL1aepO_8-WrkEcSIPUscUjak5jtxMaUoMegg/pub?start=false&loop=false#slide=id.gbe6ac7bc_0129
The documentation was recently moved to the following site, it's still spartan
https://sites.google.com/a/chromium.org/chromedriver/getting-started/getting-started---android
I am able to run test on Chrome on android device using Chrome driver. I am using QAF (formerly ISFW) - Selenium Framework and i provided following configuration:
selenium.defaultBrowser=chromeDriver
chrome.aditional.capabilities={"chromeOptions":{"androidPackage":"com.android.chrome"}}
For non ISFW user detailed information is available on Chrome driver wiki page.
I am trying to use Selenium 2.0 (Webdriver) to implement a series of tests. Before these tests can run, I have to login into the application. Since the application is not my 'own' (testing api-built functionality), each test should not be logging into my application to run.
I would prefer to do the following:
Connect my webdriver tests to my open Firefox browser (already loggedin)
Run my webdriver projects with the same browser.
I understand that Selenium usually assigns a session id to its browsers. However, the current Java implementation of Selenium 2.0 driver does not make use of session id (maybe it does but I don't know where to find it. )
Can someone provide some direction on how to resolve my issue (existing browser and run multiple tests with Selenium 2.0 (java))? Any code provided would also be helpful. Thanks!
Here is what I have learnt:
Selenium 1: As Ioan suggested earlier, use "-firefoxProfileTemplate" when starting up the Selenium RC server and point to the location of your Firefox profile.
Selenium 2: I suppose you can use the Selenium 1 RC server, however, since Selenium 2 uses WebDriver, you can point to the profile information within your code.
File profileDir = new File("/Users/_____/selenium/FFprofile");
FirefoxProfile profile =
new FirefoxProfile(profileDir);
WebDriver driver = new FirefoxDriver(
profile);
Notes:
Make sure you run "firefox -profilemanager" to create your initial profile and save your login information.
Allow the browser/website to always store your authentication credentials avoiding "popup"/"login" wwindows, etcs.
Hope this helps somebody who may run into a similar issue: Using the same browser profile in Selenium, etc.