While running script getting error 'Error communicating with the remote browser. It may have died.' in selenium using ecllipse - selenium

Trying to run the selenium script using eclipse but getting an error:
org.openqa.selenium.remote.UnreachableBrowserException: Error
communicating with the remote browser. It may have died.
Tried by by deleting process in Task Manager, even though getting same issue.
Thanks in Advance.

Related

Firefox Crash in Selenium

I use Selenium to do the web-scraping. However, my Firefox browser always crashes after a while (it is very intensive the task of scraping).
The error message from Firefox:
Firefox had a problem and crashed. We’ll try to restore your tabs and
windows when it restarts.
The error message from Python:
selenium.common.exceptions.WebDriverException: Message: Tried to run
command without establishing a connection
I'd like to know if there's a way to deal with that. Ideally, I want something like after Firefox crashes, Selenium would open a new tab and continue from where it crashed.
i tried try: except:pass this type of code and they didn't work out.

chromedrive.exe has stopped working

Am running the automation suite on the below configuration
Selenium: 3.11.0
Chrome: 65.0.3325.181
Chromedriver: 2.37
JDK: 1.8
OS: Windows 7 Enterprise(64 -bit)
On mid of the execution am getting an error as Chromedriver.exe has stopped working and the execution got stopped.
To resolve this, have tried with different version of selenium and chromedriver. Couldn't able to resolve the issue.
Issue Image
ChromeDriver Log: Log
Update:
Am getting this error whenever my code triggers the driver.get(URL) or driver.navigate().to(URL) command. FYI, am not sure this gonna help or not. Just to give more insight, my code will access two sites, in that one is https and another one is http. Am getting the exception whenever it access the http site.

What is the solution for "Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure."

I am doing selenium program and have written the script for Firefox browser. When I run the test, it opens a browser, but nothing happens after that. Console has below error:
"Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure."
What is the solution for this?
I am using code as :-
System.setProperty("webdriver.firefox.marionette","C:\\gecko‌​driver-v0.18.0-win32‌​\\geckodriver.exe");
Update your selenium jars and geckodriver. Update your firefox browser too.
This problem is happening when the jars are too old to handle new changes in browser.
Downlaod selenium jars :-
http://www.seleniumhq.org/download/
Download geckodriver :-
https://github.com/mozilla/geckodriver/releases
You are using wrong gecko parameter :-
System.setProperty("webdriver.gecko.driver","C:\\gecko‌​driver-v0.18.0-win32‌​\\geckodriver.exe");
Hope it will help you :)

InternetExplorerDriver throws WebDriverException with findElement method: NoSuchWindowException. How do I stop this?

We started a new Selenium environment with Selenium 3.4, using a grid configuration with a Linux-based hub and a Windows Server-based node. InternetExplorerDriver started throwing NoSuchWindowException when run remotely. I got the following output:
org.openqa.selenium.support.ui.ExpectedConditions findElement
WARNING: WebDriverException thrown by findElement(By.xpath: //h2[starts-with(#class, 'headline')])
org.openqa.selenium.NoSuchWindowException: Unable to find elements on closed window (WARNING: The server did not provide any stacktrace information)
[many more stack trace lines]
Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:141)
... 43 more
Ultimately it repeats the NoSuchWindowException over and over afterward.
We're running IE 11, so I ensured that Enhanced Protected Mode was disabled, the proper registry key fixes had been applied, and so on as described at SeleniumHQ (https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration), as well as many answers here on StackOverflow. Chrome works fine, Firefox works fine, IE even works fine as long as it is run locally. I can't find any more information on this.
How do I stop this exception from occurring?
For us, it was a matter of the Windows Server running the node (we had been running it on a Windows 7 machine previously). The node had to be run as an administrator. We ultimately created a shortcut and set it to be run as an administrator through the Shortcut tab -> Advanced button.

Selenium server cannot be started inside Bamboo

I am trying to configure a Selenium testing through Bamboo. I am able to run Selenium scripts directly from command line, however it always fails if I run it through Bamboo remote agent. The error is:
: Could not start Selenium session: Failed to start new browser session: Error while launching browser
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:107)
I took some advice from the web, and checked "Allow service to interact with desktop" for Bamboo remote agent service. However, it does not work.
Anyone have other suggestions?
You must run Bamboo in Console Mode for this to work. Also, the build machine desktop must be active - and not covered or minimized if you want mouse simulations to work. I know right!