Firefox freeze while working with selenium - java

i'm currently working on an automation project that use selenium on Firefox
my test works find as long that i'm not focus on the Firefox windows
once i focus on the Firefox window its immediately freeze without recovery
i disabled all security options and i have no more ideas what to do
so the question is how can i prevent firefox from freezing on me
(i'm working with Firefox version 3.6.28)

Related

Chrome and selenium headless on and off?

How can i turn on headless mode using java and selenium, and after doing some code turn it off and show the current page?
I already tried using options.setHeadless(false) but it did not work.
Refer to this question already asked:
Switching between headed and headless for a single task in Selenium

Recording headless chrome

I currently have some UI tests running in Jenkins using headless Chrome.
I am able to take screenshots but I was wondering how I could record videos from my testruns.
I read that xvfb is a possibility but since headless chrome is available, I was wondering if it would be possible to do this via devtools itself or some Java library.
Thanks in advance.
Regards

How to open chrome driver (Using Selenium Webdriver) in foreground. By default its opening in background with no focus

I've been using chrome driver (with selenium wedriver), so far it never caused any issue, now for some requirement it has to be in foreground with focus on it.
How can I make sure it is in the foreground?
Just immediately after navigating to your test URL, Maximize and Switch To the new window. It will come in the fore ground (provided you don't interfere with your mouse ;)
browser.navigate().to(test_URL);
browser.manage().window().maximize();
browser.switchTo().window(browser.getWindowHandle());
Finally I found the answer from one of the post, it worked for me, URL:
Bring the Firefox Browser to Front using selenium Java (Mac OSX)

Selenium Automatically Closes Chrome Console (attached or window)

When debugging in Chrome I expierence that Selenium is automatically closing the console window/tab (F12) even if it resides in its own detached window.
This really distrubt or even make driving a debugging session with selenium impossible.
Is there a known workaround or is this a feature I have to live with?

Selenium, WebDriver for Chrome Stopping the window opening

When using the WebDriver driver for Chrome a chrome window opens, and navigates to the specified page.
Is there a way to stop the window from opening?
Edit: I am using it to scrape the web page so there is no need for me to see the actual webpage. The desired behaviour would be that the scraping would be done "Silently"?
What you are talking about is called a headless browser.
You have several options to choose from:
fake a display and let selenium and a browser think you have a real one. See xvfb.
use PhantomJS browser
run your tests against BrowserStack or SauceLabs selenium servers (or have your own one)
See also:
Selenium Headless Automated Testing in Ubuntu
Getting Started with GhostDriver & PhantomJs

Categories